jekyll-theme-consulting 0.9.8 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b39c6bcaa95c35246ce872c70f12f9d81cf6e3f17f95eedaf07d5f344ba2516
4
- data.tar.gz: 126b31511bebc1b71876a224d52d4e4919f3a2fde8671741722d195afe7080be
3
+ metadata.gz: 69e6ed8a4f554d2c4b74d4640ab120e85ab0ae09e8c77cf4dbd5ea83d66f322b
4
+ data.tar.gz: f4e9374cb05b29fbfba15529c8c4b9c4bb0fd9887fb27f18a3d194bd8b1f5287
5
5
  SHA512:
6
- metadata.gz: a5b0747b393c8df1e4a4612a615b45c356fbc7b914ea669abd45fb444845348e5b1603f96dc78f89fff7f405c998ce445a34f0d64adda708032e8cf5c8c3ea1f
7
- data.tar.gz: 76ce6117d606ce6c3d2fe02f9c2ea729db51a3ac416a76d357ef4084fb6578772ee4e606455876936736d0f0354146c0aa6ec1ad17d63a33ae394ef7aa18dec1
6
+ metadata.gz: 598f6755974843cafdaa78bbfaeec04bc18b2ab7cc65466afc2e2d5cfb9fab6dc63c53b043c1d1a42e5eba829125ddefcf0210dc158671e4f11db8d69de3debb
7
+ data.tar.gz: c4764a57651719dd683b7f27919907432710dc303a2eb88848782123ffabb6625f8d5aa2d7f94f6f07eb405f52a0c88a765d56925ef8b597f72d9698953b9322
@@ -27,4 +27,4 @@
27
27
  </div>
28
28
  </section>
29
29
 
30
- {% include contact_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 %}
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 %}
@@ -61,7 +61,7 @@
61
61
  token: grecaptcha.getResponse(recaptchaWidget)
62
62
  };
63
63
 
64
- fetch("{{ '/contact' | absolute_url }}", {
64
+ fetch("{{ '/contact.php' | absolute_url }}", {
65
65
  method: 'POST',
66
66
  mode: 'same-origin',
67
67
  headers: {'Content-Type': 'application/json',},
@@ -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="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,400italic,600italic|Roboto+Slab:400,700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet';this.media='all'">
11
- <link rel="preload" href="{{ 'assets/css/fontawesome-all.min.css' | absolute_url }}" as="style" onload="this.onload=null;this.rel='stylesheet';this.media='all'">
12
- <link rel="preload" href="{{ 'assets/css/cookieconsent.min.css' | absolute_url }}" as="style" onload="this.onload=null;this.rel='stylesheet';this.media='all'">
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 }}" />
@@ -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
- <p>{{ tab.content }}</p>
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
+
@@ -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: 600,
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: #3d4449,
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.9.8
4
+ version: 0.10.2
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-04 00:00:00.000000000 Z
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,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