jekyll-theme-consulting 0.10.5 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/contact_client_script.html +9 -18
- data/_layouts/contact.html +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ee0b2db3e3d8f52b751a575ca96ae422803c6331449ccc6db21bf8e5992f7c
|
4
|
+
data.tar.gz: 944e65b0385226d3183eff1bd604d92f6d93153d9e8fdeff4dbf7e9288179fda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeb1cf9d5d85fa5b241ecbe94538ac6c60d705548096ca758b3f8c18f336624946c0751dc6e022585801380bfc987f493ef98c82ab482ddd3a88629cdee37ff4
|
7
|
+
data.tar.gz: 74de75686d4508d26a40ef3df06abe78634ebd494aa6bb1709aaba1b7730e26874e570799fd1163c0d2f9fb838ed383b07cafdf37fe700c703b0329a455085c7
|
@@ -54,25 +54,17 @@
|
|
54
54
|
};
|
55
55
|
|
56
56
|
const sendContactMessage = function() {
|
57
|
-
const
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
};
|
57
|
+
const formData = new FormData();
|
58
|
+
formData.append('name', encodeURIComponent(nameInputElement.value));
|
59
|
+
formData.append('email', encodeURIComponent(emailInputElement.value));
|
60
|
+
formData.append('message', encodeURIComponent(messageInputElement.value));
|
61
|
+
formData.append('token', grecaptcha.getResponse(recaptchaWidget));
|
63
62
|
|
64
63
|
fetch("{{ '/contact.php' | absolute_url }}", {
|
65
64
|
method: 'POST',
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
})
|
70
|
-
.then((response) => {
|
71
|
-
alert('Message sent!');
|
72
|
-
})
|
73
|
-
.catch((error) => {
|
74
|
-
console.error('Error:', error);
|
75
|
-
});
|
65
|
+
body: formData})
|
66
|
+
.then((response) => alert('Message sent!'))
|
67
|
+
.catch((error) => console.error('Error:', error));
|
76
68
|
};
|
77
69
|
|
78
70
|
var onRecaptchaLoadCallback = function() {
|
@@ -80,8 +72,7 @@
|
|
80
72
|
'sitekey' : '{{ site.recaptcha.sitekey }}',
|
81
73
|
'theme' : 'dark',
|
82
74
|
'size' : 'compact',
|
83
|
-
'callback' : processContactRequest
|
84
|
-
});
|
75
|
+
'callback' : processContactRequest});
|
85
76
|
};
|
86
77
|
|
87
78
|
modalWindowElement.addEventListener('click', hideModalWindow);
|
data/_layouts/contact.html
CHANGED
@@ -4,7 +4,7 @@ mail:
|
|
4
4
|
subject:
|
5
5
|
intro:
|
6
6
|
---
|
7
|
-
{%- capture mail-intro -%}You received a message on <a href=
|
7
|
+
{%- capture mail-intro -%}You received a message on <a href='{{ site.url }}'>your website</a>.{%- endcapture -%}
|
8
8
|
<?php
|
9
9
|
|
10
10
|
$contact_name = $contact_email = $contact_message = $token = $contact_ip = "";
|
@@ -73,7 +73,7 @@ function send_mail ($name, $email, $message, $ip) {
|
|
73
73
|
"{{ site.email }}",
|
74
74
|
"{{ page.mail.subject | default: 'Contact request' }}",
|
75
75
|
(
|
76
|
-
|
76
|
+
"{{ page.mail.intro | default: mail-intro }}<br>\r\n"
|
77
77
|
."Ip: ".$ip."<br>\r\n"
|
78
78
|
."Name: ".$name."<br>\r\n"
|
79
79
|
."Email: ".$email."<br>\r\n"
|