jekyll-theme-consulting 0.9.9 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/contact.html +1 -1
- data/_includes/{contact_script.html → contact_client_script.html} +1 -1
- data/_includes/tabs.html +1 -1
- data/_layouts/contact.html +80 -0
- data/_sass/libs/_vars.scss +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf4b346828d9745cd0d92091c845db875f04036618372d32d58c29e025422ad9
|
4
|
+
data.tar.gz: 411b6948e3a4c218b4a579dd8c8376722ebf51a330fdbb2add99a2947001c54d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a475fcc6994e78e1fd36047ffa70c4640ca5f8f179f0520ffa441ef7a21fcb037f88574517788bacd3f1a52aa1f35055a81aa86dc3fb43ba475a42fe9250c293
|
7
|
+
data.tar.gz: e702de5b269e20bd6d0150c3df6e449aba94a3a328b68af822bf0278e5e3e6b85436d819a76977e195c011a68fd75f37ec62dce32acb90be8466967d1c070e7d
|
data/_includes/contact.html
CHANGED
@@ -27,4 +27,4 @@
|
|
27
27
|
</div>
|
28
28
|
</section>
|
29
29
|
|
30
|
-
{% include
|
30
|
+
{% include contact_client_script.html form_id=form_id name_input_id=name_input_id email_input_id=email_input_id message_input_id=message_input_id submit_input_id=submit_input_id reset_input_id=reset_input_id recaptcha_widget_id=recaptcha_widget_id onsubmit_callback=onsubmit_callback onreset_callback=onreset_callback onfocusout_callback=onfocusout_callback %}
|
data/_includes/tabs.html
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
<label for="option-{{ tab-id }}" style="width: {{ include.header-width | default: 30 }}%;">{{ tab.title }}</label>
|
12
12
|
<section class="tab-panel" style="left: {{ include.header-width | default: 30 }}%;">
|
13
13
|
{% if show-title == true %}<h2>{{ tab.title }}</h2>{% endif %}
|
14
|
-
|
14
|
+
{{ tab.content }}
|
15
15
|
</section>
|
16
16
|
</div>
|
17
17
|
{%- endfor -%}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
permalink: /contact.php
|
3
|
+
subject: Contact request
|
4
|
+
---
|
5
|
+
<?php
|
6
|
+
|
7
|
+
$name = $email = $message = $token = $ip = "";
|
8
|
+
|
9
|
+
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
10
|
+
if (has_required_data($_POST)) {
|
11
|
+
$name = filter_var(
|
12
|
+
$_POST["name"],
|
13
|
+
FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
14
|
+
$email = filter_var(
|
15
|
+
$_POST["email"],
|
16
|
+
FILTER_SANITIZE_EMAIL);
|
17
|
+
$message = filter_var(
|
18
|
+
$_POST["message"],
|
19
|
+
FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
20
|
+
$token = filter_var(
|
21
|
+
$_POST["token"],
|
22
|
+
FILTER_SANITIZE_URL);
|
23
|
+
if (filter_var(
|
24
|
+
$_SERVER['REMOTE_ADDR'],
|
25
|
+
FILTER_VALIDATE_IP)) {
|
26
|
+
$ip = $_SERVER['REMOTE_ADDR'];
|
27
|
+
}
|
28
|
+
|
29
|
+
if (is_recaptcha_valid($token)) {
|
30
|
+
send_mail($name, $email, $message);
|
31
|
+
} else {
|
32
|
+
send_mail($name, $email, "Got a fishy request from ".$ip);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
function has_required_data($request) {
|
38
|
+
return (
|
39
|
+
(
|
40
|
+
isset($request['name'])
|
41
|
+
&& isset($request['email'])
|
42
|
+
&& isset($request['message'])
|
43
|
+
&& isset($request['token']))
|
44
|
+
&& (
|
45
|
+
!empty($request['name'])
|
46
|
+
&& !empty($request['email'])
|
47
|
+
&& !empty($request['message'])
|
48
|
+
&& !empty($request['token']))
|
49
|
+
);
|
50
|
+
}
|
51
|
+
|
52
|
+
function is_recaptcha_valid($token) {
|
53
|
+
$validation_url = "https://www.google.com/recaptcha/api/siteverify";
|
54
|
+
$data = array('secret' => '{{ site.recaptcha.secretkey }}', 'response' => $token);
|
55
|
+
$options = array(
|
56
|
+
'http' => array(
|
57
|
+
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
58
|
+
'method' => 'POST',
|
59
|
+
'content' => http_build_query($data)
|
60
|
+
)
|
61
|
+
);
|
62
|
+
$context = stream_context_create($options);
|
63
|
+
$result = json_decode(file_get_contents($validation_url, false, $context));
|
64
|
+
|
65
|
+
return (
|
66
|
+
($result !== FALSE)
|
67
|
+
&& isset($result->success)
|
68
|
+
&& $result->success);
|
69
|
+
}
|
70
|
+
|
71
|
+
function send_mail ($name, $email, $message) {
|
72
|
+
return mail(
|
73
|
+
"{{ site.email }}",
|
74
|
+
"{{ page.subject | default: 'Contact request' }}",
|
75
|
+
$message."\r\n\nFrom: ".$name." @ ".$ip,
|
76
|
+
"From: ".$name." <".$email.">\r\nMIME-Version: 1.0\r\nContent-type: text/html\r\n");
|
77
|
+
}
|
78
|
+
|
79
|
+
?>
|
80
|
+
|
data/_sass/libs/_vars.scss
CHANGED
@@ -27,7 +27,7 @@ $font: (
|
|
27
27
|
family-heading: ('Roboto Slab', serif),
|
28
28
|
family-fixed: ('Courier New', monospace),
|
29
29
|
weight: 400,
|
30
|
-
weight-bold:
|
30
|
+
weight-bold: 900,
|
31
31
|
weight-heading: 700,
|
32
32
|
weight-heading-alt: 400,
|
33
33
|
kerning-heading: 0.075em
|
@@ -40,7 +40,7 @@ $palette: (
|
|
40
40
|
bg-inverted: #6666ff,
|
41
41
|
bg-alt-inverted: #223344,
|
42
42
|
fg: #000000,
|
43
|
-
fg-bold: #
|
43
|
+
fg-bold: #000000,
|
44
44
|
fg-light: #9fa3a6,
|
45
45
|
fg-inverted: #ffffff,
|
46
46
|
fg-bold-inverted: #ffffff,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-consulting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moodule
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -77,8 +77,8 @@ files:
|
|
77
77
|
- README.md
|
78
78
|
- _includes/banner.html
|
79
79
|
- _includes/contact.html
|
80
|
+
- _includes/contact_client_script.html
|
80
81
|
- _includes/contact_form.html
|
81
|
-
- _includes/contact_script.html
|
82
82
|
- _includes/date.html
|
83
83
|
- _includes/fact.html
|
84
84
|
- _includes/feature.html
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- _includes/toggle.html
|
99
99
|
- _includes/waves/bottom.html
|
100
100
|
- _includes/waves/top.html
|
101
|
+
- _layouts/contact.html
|
101
102
|
- _layouts/default.html
|
102
103
|
- _layouts/home.html
|
103
104
|
- _layouts/index.html
|