Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lxndrblz/anatole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Balzani <balzanilo@gmail.com>2022-06-13 21:31:55 +0300
committerGitHub <noreply@github.com>2022-06-13 21:31:55 +0300
commit06847f35a19834ff26c60b691522107fa201a7a5 (patch)
treef1061b19800511d282a06798ddda0ada6b7b3ef1
parentd511a6f520bcc2ffab10ce009239904774ed6bb0 (diff)
feat: Add reCAPTCHA to the contact form (#365)
Added reCAPTCHA to contact form and fixed Italian translation.
-rw-r--r--exampleSite/config/_default/params.toml1
-rw-r--r--i18n/it.toml2
-rw-r--r--layouts/partials/contact.html3
3 files changed, 5 insertions, 1 deletions
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
index 3f7d450..1d70721 100644
--- a/exampleSite/config/_default/params.toml
+++ b/exampleSite/config/_default/params.toml
@@ -15,6 +15,7 @@ images = ["images/site-feature-image.png"]
doNotLoadAnimations = false
# Form Spree Contact Form
#contactFormAction = "https://formspree.io/f/your-form-hash-here"
+#contactFormReCaptcha = "your-site-key-here"
# Google Fonts
#googleFonts = ["Indie+Flower", "Roboto:ital,wght@0,100;0,400;0,700;1,400"]
# Google Site Verify
diff --git a/i18n/it.toml b/i18n/it.toml
index 4a7ca0c..bef0bc9 100644
--- a/i18n/it.toml
+++ b/i18n/it.toml
@@ -42,4 +42,4 @@ other = "Avviso"
other = "Informazioni"
[update]
-other = "Aggiorna" \ No newline at end of file
+other = "Aggiorna"
diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html
index 6589869..3293ace 100644
--- a/layouts/partials/contact.html
+++ b/layouts/partials/contact.html
@@ -15,6 +15,9 @@
<textarea class="field-style" name="message" id="message" rows="6" placeholder="{{ i18n "message" }}"></textarea>
</li>
<li>
+ <div class="g-recaptcha" data-sitekey="{{ .Site.Params.contactFormReCaptcha }}"></div>
+ </li>
+ <li>
<input class="field-style" type="submit" value="{{ i18n "send" }}" />
</li>
<li>