Skip to content

Commit

Permalink
Revert "Added reCAPTCHA to Formspree and support for Netlify forms"
Browse files Browse the repository at this point in the history
This reverts commit 5de4e5e.
  • Loading branch information
lxndrblz committed Jan 16, 2021
1 parent 5de4e5e commit efabd21
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 473 deletions.
32 changes: 2 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ You can easily disable the animations from the `config.toml`. All you have to do
[params]
doNotLoadAnimations = true # Animations are loaded by default
```

### Control the date Format
You can change the default date formating for the `list.html`, the `single.html` and the `index.html`. Simply configure the matching parameters.
```toml
Expand Down Expand Up @@ -266,38 +267,9 @@ use = "katex" # options: "katex", "mathjax". default is "katex".
Step 1: Configure the `contactFormAction` in the `config.toml`
```toml
[params]
contactFormAction = "https://formspree.io/f/your-form-hash-here"
#contactFormAction = "https://formspree.io/f/your-form-hash-here"
```
Step 2: Activate the `contact: true` or `contact=true` in the frontmatter of a page. See `exampleSite/content/contact.html` as an example.

Step 3: If you wish to use a Google reCAPTCHA v2, you must [go to a Google Admin console](https://www.google.com/recaptcha/about/) and create a reCAPTCHA:
Make sure it is a reCAPTCHA v2. You must then [go to your Formspree account](https://help.formspree.io/hc/en-us/articles/360022811154-Adding-a-custom-reCAPTCHA-key) and enter the secret key that you were given in the appropriate location.
Step 4: Enter the reCAPTCHA site key in `config.toml`:
```toml
[params]
contactFormReCaptchaSiteKey = "your-site-key"
```
### Netlify Contact Form on the Contact Page
Netlify forms only work when your site is being actively hosted by Netlify - unlike Formspree, testing your form locally before committing to Netlify will not work.
Step 1: Configure the `contactFormType` in the `config.toml`. Netlify does not require a `contactFormAction` configured.
```toml
[params]
contactFormType = "netlify"
```
Step 2: Set `contact: true` or `contact=true` in the frontmatter of a page. See `exampleSite/content/contact.html` as an example.

Step 3: If you wish to use a Google reCAPTCHA v2, you must [go to a Google Admin console](https://www.google.com/recaptcha/about/) and create a reCAPTCHA.
Make sure it is a reCAPTCHA v2. You must then [go to your Formspree account](https://help.formspree.io/hc/en-us/articles/360022811154-Adding-a-custom-reCAPTCHA-key) and enter the secret key that you were given in the appropriate location.

Step 4: Enter the reCAPTCHA site key in `config.toml`:
```toml
[params]
contactFormReCaptchaSiteKey = "your-site-key"
```
Step 5: [Go to your Netlify account](https://www.netlify.com/blog/2018/05/23/bring-your-own-recaptcha-to-netlify-forms/) and let them know both the site key and the secret key for your custom reCAPTCHA.

Step 6: You will probably want to set up some [form notification](https://docs.netlify.com/forms/notifications/).

### Twitter Cards support

In order to use the full functionality of Twitter cards, you will have to define a couple of settings in the `config.toml` and the frontmatter of a page.
Expand Down
36 changes: 6 additions & 30 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
--tag-color: #424242;
--blockquote-text-color: #858585;
--blockquote-border-color: #dfe2e5;
--error-color: #ff3939;
--thumbnail-height: 15em;
scroll-padding-top: 100px;
--font-family: 'Verdana', sans-serif;
}

html[data-theme='dark'] {
Expand All @@ -34,7 +32,6 @@ html[data-theme='dark'] {
--tag-color: rgb(191, 191, 191);
--blockquote-text-color: #808080;
--blockquote-border-color: #424242;
--error-color: #ff3939;
}

html {
Expand All @@ -44,7 +41,7 @@ html {

body {
color: var(--body-color);
font-family: var(--font-family);
font-family: 'Verdana', sans-serif;
font-size: 15px;
width: 100%;
margin: 0 auto 30px auto;
Expand Down Expand Up @@ -133,48 +130,40 @@ a:active {

@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-20px);
}

100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}

@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-20px);
}

100% {
opacity: 1;
-moz-transform: translateY(0);
}
}

@-o-keyframes fadeInDown {
0% {
opacity: 0;
-o-transform: translateY(-20px);
}

100% {
opacity: 1;
-o-transform: translateY(0);
}
}

@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-20px);
}

100% {
opacity: 1;
transform: translateY(0);
}
}
Expand Down Expand Up @@ -1063,7 +1052,7 @@ print {
border: 1px solid var(--form-border-color);
color: var(--body-color);
}
.form-style ul li .field-style:focus {
.form-style ul li .field-style:focus {
box-shadow: 0 0 5px;
border:1px solid;
}
Expand All @@ -1079,17 +1068,14 @@ print {
.form-style ul li input.align-right {
float:right;
}
.form-style input,
.form-style textarea {
font-family: var(--font-family);
}
.form-style ul li textarea {
background-color: var(--bg-color);
border: 1px solid var(--form-border-color);
color: var(--body-color);
width: 100%;
height: auto;
}
.form-style ul li input[type="button"],
.form-style ul li input[type="submit"] {
background-color: var(--bg-color);
border: 1px solid var(--form-border-color);
Expand All @@ -1099,20 +1085,10 @@ print {
text-decoration: none;
width: 100%;
}
.form-style ul li input[type="button"]:hover,
.form-style ul li input[type="submit"]:hover {
background-color: var(--bg-color);
border: 1px solid var(--form-button-hover-border-color);
}
.form-style .form-row {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
}
.form-feedback {
text-align: center;
}
.form-feedback[feedback-success="false"] {
color: var(--error-color);
}
/* (CONTACT) FORM END */

/* (CONTACT) FORM END */
29 changes: 1 addition & 28 deletions i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,5 @@ other = "Du kannst hier zurück zur <a href=\"{{ . }}\">Startseite</a>."
[comments]
other = "Kommentare"

[name]
other = "Name"

[name_error]
other = "Bitte geben Sie Ihren Namen an"

[email]
other = "Email"

[email_error]
other = "Bitte geben Sie eine gültige E-Mail Adresse ein"

[message]
other = "Nachricht"

[message_error]
other = "Bitte teilen Sie uns mit, warum Sie sich an uns wenden"

[send]
other = "Senden"

[form_captcha_error]
other = "Captcha-Fehler; bitte versuchen Sie es später noch einmal"

[form_error]
other = "Fataler Fehler, Kontakt nicht hergestellt - bitte melden Sie sich auf anderem Wege"

[form_success]
other = "Thank für Ihre Kontaktaufnahme. Wir werden uns bald bei Ihnen melden."
other = "Senden"
29 changes: 1 addition & 28 deletions i18n/dk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,5 @@ other = "Returner til <a href=\"{{ . }}\">homepage</a>."
[comments]
other = "kommentar"

[name]
other = "Name"

[name_error]
other = "Please provide your name"

[email]
other = "Email"

[email_error]
other = "Please enter a valid email address"

[message]
other = "Message"

[message_error]
other = "Please let us know why you are contacting us"

[send]
other = "Sende"

[form_captcha_error]
other = "Captcha error; please try again later"

[form_error]
other = "Fatal error, contact not made - please reach out some other way"

[form_success]
other = "Thank you for reaching out! We will be touch soon"
other = "Sende"
29 changes: 1 addition & 28 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,5 @@ other = "You can head back to <a href=\"{{ . }}\">homepage</a>."
[comments]
other = "comments"

[name]
other = "Name"

[name_error]
other = "Please provide your name"

[email]
other = "Email"

[email_error]
other = "Please enter a valid email address"

[message]
other = "Message"

[message_error]
other = "Please let us know why you are contacting us"

[send]
other = "Send"

[form_captcha_error]
other = "Captcha error; please try again later"

[form_error]
other = "Fatal error, contact not made - please reach out in some other way"

[form_success]
other = "Thank you for reaching out! We will be touch soon"
other = "Send"
29 changes: 1 addition & 28 deletions i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,5 @@ other = "Puedes regresar a la <a href=\"{{ . }}\">página inicial</a>."
[comments]
other = "comentarios"

[name]
other = "Nombre"

[name_error]
other = "Por favor, indique su nombre"

[email]
other = "Email"

[email_error]
other = "Por favor, introduzca una dirección de correo electrónico válida"

[message]
other = "Mensaje"

[message_error]
other = "Por favor, háganos saber por qué está contactando con nosotros"

[send]
other = "Enviar"

[form_captcha_error]
other = "Error de Captcha; por favor, inténtelo de nuevo más tarde"

[form_error]
other = "Error fatal, contacto no realizado - por favor, contacte de otra manera"

[form_success]
other = "¡Gracias por tender la mano! Pronto nos tocará"
other = "Enviar"
29 changes: 1 addition & 28 deletions i18n/fa.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,5 @@ other = "شما می‌توانید برگردید به <a href=\"{{ . }}\">صف
[comments]
other = "نظرات"

[name]
other = "Name"

[name_error]
other = "Please provide your name"

[email]
other = "Email"

[email_error]
other = "Please enter a valid email address"

[message]
other = "Message"

[message_error]
other = "Please let us know why you are contacting us"

[send]
other = "ارسال"

[form_captcha_error]
other = "Captcha error; please try again later"

[form_error]
other = "Fatal error, contact not made - please reach out some other way"

[form_success]
other = "Thank you for reaching out! We will be touch soon"
other = "ارسال"
29 changes: 1 addition & 28 deletions i18n/fi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,5 @@ other = "Voit palata takaisin <a href=\"{{ . }}\">kotisivulle</a>."
[comments]
other = "kommentit"

[name]
other = "Name"

[name_error]
other = "Please provide your name"

[email]
other = "Email"

[email_error]
other = "Please enter a valid email address"

[message]
other = "Message"

[message_error]
other = "Please let us know why you are contacting us"

[send]
other = "Lähetä"

[form_captcha_error]
other = "Captcha error; please try again later"

[form_error]
other = "Fatal error, contact not made - please reach out some other way"

[form_success]
other = "Thank you for reaching out! We will be touch soon"
other = "Lähetä"

0 comments on commit efabd21

Please sign in to comment.