jekyll-theme-consulting 0.9.6 → 0.10.0
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/contact_server_script.php +70 -0
- data/_includes/head.html +3 -3
- data/_includes/tabs.html +1 -1
- data/_sass/libs/_vars.scss +2 -2
- data/_sass/main/components/_horizontal-tabs.scss +1 -1
- data/_sass/main/components/_vertical-tabs.scss +1 -1
- 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: 606108f5aa0396efdd45e7c86cb130e6b2e178f877b427c620572206b412c60d
|
4
|
+
data.tar.gz: ddfdf3ae14502e3b2d99b9fe685686e5596da4ca2125bdd6967845631a546f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f31332096f41bdfc8f23ee87c00b55886b8cb777f7482efc052540dfd2197aad1e2302da2d4680155d57f86b5dc3c4938a61f6cbce0a2f1613bd67f0b1c701fa
|
7
|
+
data.tar.gz: 5223040f1b057537680fca1b9875f19f5d507a55f38c11a124741d451b4841fc409276b575c59ee5585ad001a65238c4b3a1765c06fb5fc4c6f055ae0358af55
|
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 %}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
$name = $email = $message = $token = "";
|
4
|
+
|
5
|
+
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
6
|
+
if (has_required_data($_POST)) {
|
7
|
+
$name = filter_var(
|
8
|
+
$_POST["name"],
|
9
|
+
FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
10
|
+
$email = filter_var(
|
11
|
+
$_POST["email"],
|
12
|
+
FILTER_SANITIZE_EMAIL);
|
13
|
+
$message = filter_var(
|
14
|
+
$_POST["message"],
|
15
|
+
FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
16
|
+
$token = filter_var(
|
17
|
+
$_POST["token"],
|
18
|
+
FILTER_SANITIZE_URL);
|
19
|
+
|
20
|
+
if is_recaptcha_valid($token) {
|
21
|
+
send_mail($name, $email, $message);
|
22
|
+
} else {
|
23
|
+
send_mail($name, $email, "Is fishy.")
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
function has_required_data($request) {
|
29
|
+
return (
|
30
|
+
(
|
31
|
+
isset($request['name'])
|
32
|
+
&& isset($request['email'])
|
33
|
+
&& isset($request['message'])
|
34
|
+
&& isset($request['token']))
|
35
|
+
&& (
|
36
|
+
!empty($request['name'])
|
37
|
+
&& !empty($request['email'])
|
38
|
+
&& !empty($request['message'])
|
39
|
+
&& !empty($request['token']))
|
40
|
+
);
|
41
|
+
}
|
42
|
+
|
43
|
+
function is_recaptcha_valid($token) {
|
44
|
+
$validation_url = "https://www.google.com/recaptcha/api/siteverify";
|
45
|
+
$data = array('secret' => '{{ site.recaptcha.secretkey }}', 'response' => $token);
|
46
|
+
$options = array(
|
47
|
+
'http' => array(
|
48
|
+
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
49
|
+
'method' => 'POST',
|
50
|
+
'content' => http_build_query($data)
|
51
|
+
)
|
52
|
+
);
|
53
|
+
$context = stream_context_create($options);
|
54
|
+
$result = json_decode(file_get_contents($validation_url, false, $context));
|
55
|
+
|
56
|
+
return (
|
57
|
+
($result !== FALSE)
|
58
|
+
&& isset($result->success)
|
59
|
+
&& $result->success);
|
60
|
+
}
|
61
|
+
|
62
|
+
function send_mail ($name, $email, $message) {
|
63
|
+
return mail(
|
64
|
+
"{{ site.email }}",
|
65
|
+
"{{ include.subject | default: 'Contact request' }}",
|
66
|
+
$message,
|
67
|
+
"From: ".$name." <".$email.">\r\nMIME-Version: 1.0\r\nContent-type: text/html\r\n");
|
68
|
+
}
|
69
|
+
|
70
|
+
?>
|
data/_includes/head.html
CHANGED
@@ -7,9 +7,9 @@
|
|
7
7
|
<link rel="stylesheet" href="{{ 'assets/css/large.css' | absolute_url }}" media="screen and (min-width: 981px)" />
|
8
8
|
<link rel="stylesheet" href="{{ 'assets/css/medium.css' | absolute_url }}" media="screen and (min-width: 737px) and (max-width:980px)" />
|
9
9
|
<link rel="stylesheet" href="{{ 'assets/css/small.css' | absolute_url }}" media="screen and (max-width:736px)" />
|
10
|
-
<link rel="
|
11
|
-
<link rel="
|
12
|
-
<link rel="
|
10
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,400italic,600italic|Roboto+Slab:400,700&display=swap" type="text/css" media="all">
|
11
|
+
<link rel="stylesheet" href="{{ 'assets/css/fontawesome-all.min.css' | absolute_url }}" type="text/css" media="all">
|
12
|
+
<link rel="stylesheet" href="{{ 'assets/css/cookieconsent.min.css' | absolute_url }}" type="text/css" media="all">
|
13
13
|
{%- if include.stylesheets -%}
|
14
14
|
{%- for file in include.stylesheets -%}
|
15
15
|
<link rel="stylesheet" href="{{ file.url | absolute_url }}" />
|
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 -%}
|
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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moodule
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07
|
11
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -77,8 +77,9 @@ 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/
|
82
|
+
- _includes/contact_server_script.php
|
82
83
|
- _includes/date.html
|
83
84
|
- _includes/fact.html
|
84
85
|
- _includes/feature.html
|