Skip to content

Instantly share code, notes, and snippets.

@dnnysng
dnnysng / contact.html
Created March 8, 2022 03:24
Hidden form so Netlify can detect in React
<form name="contact" netlify netlify-honeypot="bot-field" hidden>
<input type="text" name="name" />
<input type="email" name="email" />
<textarea name="message"></textarea>
</form>
@dnnysng
dnnysng / contact.js
Last active March 8, 2022 03:09
This is a contact form setup for React & Netlify
<form name="contact" method="post">
<input type="hidden" name="form-name" value="contact" />
<label for="name">Name</label>
<input type="text" name="name" placeholder="Your name.." />
<label for="email">Email</label>
<input type="email" name="email" placeholder="Your email.." />
<label for="message">Message</label>
<textarea
name="message"
placeholder="Write message.."/
@dnnysng
dnnysng / importing_font.css
Last active November 20, 2022 11:08
Importing a Font to a React Project
/* FONT_NAME = Your font name, i.e. Arial */
/* PATH_TO_YOUR_FILE = The relative path to your font from index.css */
/* Note: Most of the Google fonts I've seen are .ttf which is the 'truetype' format */
@font-face {
font-family: 'FONT_NAME';
src: local('FONT_NAME'),
url('PATH_TO_YOUR_FILE') format('truetype');
}