jekyll-theme-ethereal 0.4.4 → 0.5.4

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.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +54 -1
  3. data/_includes/contact_form.html +11 -7
  4. data/_includes/contact_script.html +60 -22
  5. data/_includes/head.html +11 -1
  6. data/_includes/panel_contact.html +4 -4
  7. data/_includes/panel_map.html +71 -97
  8. data/_includes/scripts.html +8 -19
  9. data/_includes/search.html +8 -6
  10. data/_layouts/default.html +4 -4
  11. data/_sass/large.scss +49 -0
  12. data/_sass/large/base/_page.scss +0 -0
  13. data/_sass/large/base/_reset.scss +0 -0
  14. data/_sass/large/base/_typography.scss +11 -0
  15. data/_sass/large/components/_actions.scss +0 -0
  16. data/_sass/large/components/_button.scss +0 -0
  17. data/_sass/large/components/_contact-icons.scss +0 -0
  18. data/_sass/large/components/_form.scss +0 -0
  19. data/_sass/large/components/_gallery.scss +0 -0
  20. data/_sass/large/components/_grid-icons.scss +0 -0
  21. data/_sass/large/components/_icon.scss +0 -0
  22. data/_sass/large/components/_icons.scss +0 -0
  23. data/_sass/large/components/_image.scss +0 -0
  24. data/_sass/large/components/_list.scss +0 -0
  25. data/_sass/large/components/_panel-banner.scss +0 -0
  26. data/_sass/large/components/_panel-map.scss +0 -0
  27. data/_sass/large/components/_panel-spotlight.scss +0 -0
  28. data/_sass/large/components/_panel.scss +0 -0
  29. data/_sass/large/components/_table.scss +0 -0
  30. data/_sass/large/layout/_footer.scss +0 -0
  31. data/_sass/large/layout/_header.scss +0 -0
  32. data/_sass/large/layout/_page-wrapper.scss +0 -0
  33. data/_sass/large/layout/_wrapper.scss +0 -0
  34. data/_sass/libs/_breakpoints.scss +164 -164
  35. data/_sass/libs/_functions.scss +32 -32
  36. data/_sass/libs/_mixins.scss +225 -49
  37. data/_sass/libs/_vars.scss +40 -40
  38. data/_sass/libs/_vendor.scss +331 -331
  39. data/_sass/main.scss +25 -118
  40. data/_sass/main/base/_page.scss +99 -0
  41. data/_sass/main/base/_reset.scss +76 -0
  42. data/_sass/main/base/_typography.scss +193 -0
  43. data/_sass/main/components/_actions.scss +63 -0
  44. data/_sass/main/components/_button.scss +154 -0
  45. data/_sass/main/components/_contact-icons.scss +72 -0
  46. data/_sass/main/components/_form.scss +253 -0
  47. data/_sass/main/components/_gallery.scss +168 -0
  48. data/_sass/main/components/_grid-icons.scss +139 -0
  49. data/_sass/main/components/_icon.scss +33 -0
  50. data/_sass/main/components/_icons.scss +28 -0
  51. data/_sass/main/components/_image.scss +169 -0
  52. data/_sass/main/components/_list.scss +56 -0
  53. data/_sass/main/components/_panel-banner.scss +52 -0
  54. data/_sass/main/components/_panel-map.scss +0 -0
  55. data/_sass/main/components/_panel-spotlight.scss +62 -0
  56. data/_sass/main/components/_panel.scss +224 -0
  57. data/_sass/main/components/_table.scss +81 -0
  58. data/_sass/main/layout/_footer.scss +30 -0
  59. data/_sass/main/layout/_header.scss +35 -0
  60. data/_sass/main/layout/_page-wrapper.scss +22 -0
  61. data/_sass/main/layout/_wrapper.scss +85 -0
  62. data/_sass/medium.scss +48 -0
  63. data/_sass/medium/base/_page.scss +0 -0
  64. data/_sass/medium/base/_reset.scss +0 -0
  65. data/_sass/medium/base/_typography.scss +0 -0
  66. data/_sass/medium/components/_actions.scss +0 -0
  67. data/_sass/medium/components/_button.scss +0 -0
  68. data/_sass/medium/components/_contact-icons.scss +0 -0
  69. data/_sass/medium/components/_form.scss +0 -0
  70. data/_sass/medium/components/_gallery.scss +11 -0
  71. data/_sass/medium/components/_grid-icons.scss +0 -0
  72. data/_sass/medium/components/_icon.scss +0 -0
  73. data/_sass/medium/components/_icons.scss +0 -0
  74. data/_sass/medium/components/_image.scss +0 -0
  75. data/_sass/medium/components/_list.scss +0 -0
  76. data/_sass/medium/components/_panel-banner.scss +0 -0
  77. data/_sass/medium/components/_panel-map.scss +0 -0
  78. data/_sass/medium/components/_panel-spotlight.scss +0 -0
  79. data/_sass/medium/components/_panel.scss +0 -0
  80. data/_sass/medium/components/_table.scss +0 -0
  81. data/_sass/medium/layout/_footer.scss +0 -0
  82. data/_sass/medium/layout/_header.scss +0 -0
  83. data/_sass/medium/layout/_page-wrapper.scss +0 -0
  84. data/_sass/medium/layout/_wrapper.scss +0 -0
  85. data/_sass/noscript.scss +12 -12
  86. data/_sass/short.scss +49 -0
  87. data/_sass/short/base/_page.scss +0 -0
  88. data/_sass/short/base/_reset.scss +0 -0
  89. data/_sass/short/base/_typography.scss +0 -0
  90. data/_sass/short/components/_actions.scss +0 -0
  91. data/_sass/short/components/_button.scss +0 -0
  92. data/_sass/short/components/_contact-icons.scss +0 -0
  93. data/_sass/short/components/_form.scss +1 -0
  94. data/_sass/short/components/_gallery.scss +0 -0
  95. data/_sass/short/components/_grid-icons.scss +0 -0
  96. data/_sass/short/components/_icon.scss +0 -0
  97. data/_sass/short/components/_icons.scss +0 -0
  98. data/_sass/short/components/_image.scss +0 -0
  99. data/_sass/short/components/_list.scss +0 -0
  100. data/_sass/short/components/_panel-banner.scss +0 -0
  101. data/_sass/short/components/_panel-map.scss +0 -0
  102. data/_sass/short/components/_panel-spotlight.scss +0 -0
  103. data/_sass/short/components/_panel.scss +0 -0
  104. data/_sass/short/components/_table.scss +0 -0
  105. data/_sass/short/layout/_footer.scss +0 -0
  106. data/_sass/short/layout/_header.scss +0 -0
  107. data/_sass/short/layout/_page-wrapper.scss +9 -0
  108. data/_sass/short/layout/_wrapper.scss +0 -0
  109. data/_sass/small.scss +50 -0
  110. data/_sass/small/base/_page.scss +18 -0
  111. data/_sass/small/base/_reset.scss +0 -0
  112. data/_sass/small/base/_typography.scss +67 -0
  113. data/_sass/small/components/_actions.scss +0 -0
  114. data/_sass/small/components/_button.scss +0 -0
  115. data/_sass/small/components/_contact-icons.scss +0 -0
  116. data/_sass/small/components/_form.scss +27 -0
  117. data/_sass/small/components/_gallery.scss +38 -0
  118. data/_sass/small/components/_grid-icons.scss +29 -0
  119. data/_sass/small/components/_icon.scss +0 -0
  120. data/_sass/small/components/_icons.scss +0 -0
  121. data/_sass/small/components/_image.scss +0 -0
  122. data/_sass/small/components/_list.scss +0 -0
  123. data/_sass/small/components/_panel-banner.scss +37 -0
  124. data/_sass/small/components/_panel-map.scss +13 -0
  125. data/_sass/small/components/_panel-spotlight.scss +18 -0
  126. data/_sass/small/components/_panel.scss +80 -0
  127. data/_sass/small/components/_table.scss +0 -0
  128. data/_sass/small/layout/_footer.scss +34 -0
  129. data/_sass/small/layout/_header.scss +0 -0
  130. data/_sass/small/layout/_page-wrapper.scss +12 -0
  131. data/_sass/small/layout/_wrapper.scss +26 -0
  132. data/{_sass/components/_cookieconsent.scss → assets/css/cookieconsent.css} +3 -2
  133. data/assets/css/cookieconsent.min.css +1 -0
  134. data/assets/css/fontawesome-all.min.css +1 -1
  135. data/assets/css/large.scss +5 -0
  136. data/assets/css/mapbox-gl.css +1 -600
  137. data/assets/css/mapbox-gl.min.css +1 -0
  138. data/assets/css/mapbox-gl.panel.css +27 -0
  139. data/assets/css/mapbox-gl.panel.min.css +1 -0
  140. data/assets/css/medium.scss +5 -0
  141. data/assets/css/short.scss +5 -0
  142. data/assets/css/small.scss +5 -0
  143. data/assets/js/cookieconsent.style.min.js +1 -0
  144. data/assets/js/lazy-loading.min.js +1 -0
  145. data/assets/js/main.js +2 -2
  146. data/assets/js/main.min.js +42 -0
  147. data/assets/js/mapbox-gl.min.js +40 -0
  148. metadata +129 -25
  149. data/_sass/base/_page.scss +0 -117
  150. data/_sass/base/_reset.scss +0 -76
  151. data/_sass/base/_typography.scss +0 -271
  152. data/_sass/components/_actions.scss +0 -63
  153. data/_sass/components/_button.scss +0 -154
  154. data/_sass/components/_contact-icons.scss +0 -72
  155. data/_sass/components/_form.scss +0 -279
  156. data/_sass/components/_gallery.scss +0 -218
  157. data/_sass/components/_grid-icons.scss +0 -166
  158. data/_sass/components/_icon.scss +0 -33
  159. data/_sass/components/_icons.scss +0 -28
  160. data/_sass/components/_image.scss +0 -169
  161. data/_sass/components/_list.scss +0 -56
  162. data/_sass/components/_panel-banner.scss +0 -90
  163. data/_sass/components/_panel-spotlight.scss +0 -81
  164. data/_sass/components/_panel.scss +0 -300
  165. data/_sass/components/_table.scss +0 -81
  166. data/_sass/layout/_footer.scss +0 -49
  167. data/_sass/layout/_header.scss +0 -37
  168. data/_sass/layout/_page-wrapper.scss +0 -43
  169. data/_sass/layout/_wrapper.scss +0 -118
  170. data/assets/js/mapbox-gl.js +0 -40
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4829788dcf229f8607a851a59fef4b0ec3cf867b70a3f35e70e28e029e4b59cf
4
- data.tar.gz: 4a6a05fae117d3f0bf8311dc2b6c79fa5d6761e6f2aa2cfb5f9f9b0c4e3040fb
3
+ metadata.gz: 7cac4ccb50a2c237176745f4d120dc2edf954560ba572867a71abf99b098abf6
4
+ data.tar.gz: 7ee252ea2eb109cf6fef4c338daa72a054a122a4356efe6639e1c319c516ff12
5
5
  SHA512:
6
- metadata.gz: 84a8f7a6e7fc1cde37561390945f799ce909d665f0e87ff4491e88009c7ed958ead8c79a78d79968c94e78e96de4de52a57bbae4a3ac1fd9e62dd2cb626a4a4c
7
- data.tar.gz: 7c16413fcb5637f37c7b7d0f508af66d4e24b2fc298cbac3d77ae9cefdd79039c4793be66022d797a70bdbaa3e526ee5f35ac221a36304de1f7e6a5306824c81
6
+ metadata.gz: feae88684c81c59aeec376fa0a32919e8f61906226fbc9cf34cc3a72451a2fee33170cb5c09ffe3dd5be2ea61906768507871d9f7e67a53d2c0329c4d24aac39
7
+ data.tar.gz: ecb7a2b8d62e3886276976ba2e7a520f7024509eb47436180d3c267ba56e428dc8b4a0658ba96f3a52fcc160beb83a0f3490d2dcfebfe5e7779f0f23b3ea367f
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  You can preview the theme [here](https://moodule.github.io/jekyll-theme-ethereal)
6
6
 
7
- ![Ethereal Theme](assets/images/screenshot.jpg "Ethereal Theme")
7
+ ![Ethereal Theme](assets/images/screenshot.webp "Ethereal Theme")
8
8
 
9
9
  # Features
10
10
 
@@ -24,6 +24,8 @@ You can preview the theme [here](https://moodule.github.io/jekyll-theme-ethereal
24
24
 
25
25
  > **Light**: svg images, thumbs and lazy loading for raster images, few libraries
26
26
 
27
+ > **Performant**: parallel loading & execution of assets, support lazy-loading, minified assets, compressed critical path
28
+
27
29
  > **Hardened**: form validation, recaptcha, verified libraries
28
30
 
29
31
  # Installation
@@ -80,6 +82,57 @@ The contact form is validated using [google's recaptcha plugin][recaptcha-docume
80
82
  First, you need to [sign your website up] to enable the plugin.
81
83
  Google will provide you with a **client-side integration key**: copy it to `_config.yml` under `recaptcha.sitekey`.
82
84
 
85
+ ## Images
86
+
87
+ ### Lazy-Loading
88
+
89
+ Images downloading & rendering can be defered until they enter the viewport.
90
+ This shortens the loading of the webpage, with no consequence on the displayed content since the images are off-screen.
91
+
92
+ There are 2 possibilities:
93
+ 1) using the scripts bundled with the gem
94
+ 2) depending on the browser
95
+
96
+ Browser support for lazy-loading is varying, so it is recommanded to opt for the first solution.
97
+
98
+ #### Using the gem functionality
99
+
100
+ - add `class="lazy-loading"`
101
+ - fill the attribute `src` with the path to the placeholder file
102
+ - fill the attribute `data-src` with the path to the content file
103
+
104
+ Before:
105
+ ```html
106
+ <img src="{{ 'assets/images/content.jpg' | absolute_url }}" />
107
+ ```
108
+
109
+ After:
110
+ ```html
111
+ <img class="lazy-loading" src="{{ 'assets/images/placeholder.jpg' | absolute_url }}" data-src="{{ 'assets/images/content.jpg' | absolute_url }}" />
112
+ ```
113
+
114
+ #### Using the browser functionality
115
+
116
+ - add `loading="lazy"`
117
+
118
+ Before:
119
+ ```html
120
+ <img src="{{ 'assets/images/content.jpg' | absolute_url }}" />
121
+ ```
122
+
123
+ After:
124
+ ```html
125
+ <img loading="lazy" src="{{ 'assets/images/content.jpg' | absolute_url }}" />
126
+ ```
127
+
128
+ > This functionality is not supported by all the browsers!
129
+
130
+ ### Compression and file formats
131
+
132
+ It is recommanded to use the `webp` format.
133
+
134
+ At a given dimension and compression level (quality) the webp files are at least half the size with a smoother feel.
135
+
83
136
  ## Publication
84
137
 
85
138
  ### On Github Pages
@@ -1,21 +1,25 @@
1
- <form method="post" id="{{ include.form_id | 'contact-form' }}" action="#" onsubmit="{{ include.onsubmit_callback | 'sendContactMessage' }}()" onreset="{{ include.onreset_callback | 'resetContactForm' }}()" >
1
+ <form method="post" id="{{ include.form_id | default: 'contact-form' }}" action="javascript:void(0);" onsubmit="{{ include.onsubmit_callback | default: 'processContactRequest' }}()" onreset="{{ include.onreset_callback | default: 'resetContactForm' }}()" >
2
2
  <div class="fields">
3
3
  <div class="field half">
4
4
  <label for="name">Name</label>
5
- <input type="text" name="{{ include.name_input_id | 'contact-name' }}" id="{{ include.name_input_id | 'contact-name' }}" required minlength="4" maxlength="64" />
5
+ <input type="text" name="{{ include.name_input_id | default: 'contact-name' }}" id="{{ include.name_input_id | default: 'contact-name' }}" placeholder="John Doe" required minlength="4" maxlength="64" onfocusout="{{ include.onfocusout_callback | default: 'toggleSubmitInputElement' }}()" />
6
6
  </div>
7
7
  <div class="field half">
8
8
  <label for="email">Email</label>
9
- <input type="email" name="{{ include.email_input_id | 'contact-email' }}" id="{{ include.email_input_id | 'contact-email' }}" required minlength="8" maxlength="64" />
9
+ <input type="email" name="{{ include.email_input_id | default: 'contact-email' }}" id="{{ include.email_input_id | default: 'contact-email' }}" placeholder="john.doe@example.com" required minlength="8" maxlength="64" onfocusout="{{ include.onfocusout_callback | default: 'toggleSubmitInputElement' }}()" />
10
10
  </div>
11
11
  <div class="field">
12
12
  <label for="message">Message</label>
13
- <textarea name="{{ include.message_input_id | 'contact-message' }}" id="{{ include.message_input_id | 'contact-message' }}" rows="4"vrequired minlength="16" maxlength="256" ></textarea>
13
+ <textarea name="{{ include.message_input_id | default: 'contact-message' }}" id="{{ include.message_input_id | default: 'contact-message' }}" placeholder="Please reach out!" rows="4" required minlength="16" maxlength="256" onfocusout="{{ include.onfocusout_callback | default: 'toggleSubmitInputElement' }}()" ></textarea>
14
14
  </div>
15
15
  </div>
16
16
  <ul class="actions">
17
- <li><div id="{{ include.recaptcha_widget_id | 'recaptcha-checkbox' }}" ></div></li>
18
- <li><input type="submit" id="{{ include.submit_input_id | 'contact-submit-button' }}" value="Send Message" class="button primary fa-envelope" disabled /></li>
19
- <li><input type="reset" id="{{ include.reset_input_id | 'contact-reset-button' }}" value="Reset" class="icon button fa-undo" /></li>
17
+ <li><input type="submit" id="{{ include.submit_input_id | default: 'contact-submit-button' }}" value="Send Message" class="button primary fa-envelope" disabled /></li>
18
+ <li><input type="reset" id="{{ include.reset_input_id | default: 'contact-reset-button' }}" value="Reset" class="icon button fa-undo" /></li>
20
19
  </ul>
20
+ <div id="modal-recaptcha-window" class="modal" tabIndex="-1">
21
+ <div class="inner">
22
+ <div id="{{ include.recaptcha_widget_id | default: 'recaptcha-checkbox' }}" ></div>
23
+ </div>
24
+ </div>
21
25
  </form>
@@ -1,9 +1,10 @@
1
- <script type="text/javascript">
1
+ <script type="text/javascript" >
2
2
  const contactFormElement = document.getElementById("{{ include.form_id | default: 'contact-form' }}");
3
3
  const nameInputElement = document.getElementById("{{ include.name_input_id | default: 'contact-name' }}");
4
4
  const emailInputElement = document.getElementById("{{ include.email_input_id | default: 'contact-email' }}");
5
5
  const messageInputElement = document.getElementById("{{ include.message_input_id | default: 'contact-message' }}");
6
6
  const submitInputElement = document.getElementById("{{ include.submit_input_id | default: 'contact-submit-button' }}");
7
+ const modalWindowElement = document.getElementById("{{ include.modal_window_id | default: 'modal-recaptcha-window' }}");
7
8
  var recaptchaWidget;
8
9
 
9
10
  const isInputValid = function() {
@@ -11,42 +12,79 @@
11
12
  && emailInputElement.checkValidity()
12
13
  && messageInputElement.checkValidity())
13
14
  };
14
-
15
- const isRecaptchaValid = function() {
16
- var responseToken = grecaptcha.getResponse(recaptchaWidget);
17
- return true;
18
- };
19
15
 
20
16
  const disableSubmitInputElement = function (disabled = true) {
21
17
  submitInputElement.disabled = disabled;
22
18
  }
23
19
 
24
- const {{ include.onreset_callback | 'resetContactForm' }} = function() {
20
+ const {{ include.onfocusout_callback | default: 'toggleSubmitInputElement' }} = function() {
21
+ if (isInputValid()) {
22
+ disableSubmitInputElement(false);
23
+ } else {
24
+ disableSubmitInputElement();
25
+ }
26
+ };
27
+
28
+ const showModalWindow = function() {
29
+ modalWindowElement.classList.add('visible');
30
+ modalWindowElement.classList.add('loaded');
31
+ modalWindowElement.focus();
32
+ }
33
+
34
+ const hideModalWindow = function() {
35
+ modalWindowElement.classList.remove('loaded');
36
+ modalWindowElement.classList.remove('visible');
37
+ contactFormElement.focus();
38
+ }
39
+
40
+ const {{ include.onsubmit_callback | default: 'processContactRequest' }} = function() {
41
+ if (grecaptcha.getResponse(recaptchaWidget).length > 0) {
42
+ sendContactMessage();
43
+ hideModalWindow();
44
+ resetContactForm();
45
+ grecaptcha.reset();
46
+ } else {
47
+ showModalWindow();
48
+ }
49
+ };
50
+
51
+ const {{ include.onreset_callback | default: 'resetContactForm' }} = function() {
25
52
  contactFormElement.reset();
26
53
  disableSubmitInputElement();
27
54
  };
28
55
 
29
- const {{ include.onsubmit_callback | 'sendContactMessage()' }} = function() {
30
- encodeURIComponent(nameInputElement.value);
31
- encodeURIComponent(emailInputElement.value);
32
- encodeURIComponent(messageInputElement.value);
56
+ const sendContactMessage = function() {
57
+ const data = {
58
+ name: encodeURIComponent(nameInputElement.value),
59
+ email: encodeURIComponent(emailInputElement.value),
60
+ message: encodeURIComponent(messageInputElement),
61
+ token: grecaptcha.getResponse(recaptchaWidget)
62
+ };
63
+
64
+ fetch("{{ '/contact' | absolute_url }}", {
65
+ method: 'POST',
66
+ mode: 'same-origin',
67
+ headers: {'Content-Type': 'application/json',},
68
+ body: JSON.stringify(data),
69
+ })
70
+ .then((response) => {
71
+ alert('Message sent!');
72
+ })
73
+ .catch((error) => {
74
+ console.error('Error:', error);
75
+ });
33
76
  };
34
77
 
35
78
  var onloadCallback = function() {
36
- var verifyForm = function(response) {
37
- if (isInputValid() && isRecaptchaValid()) {
38
- disableSubmitInputElement(false);
39
- } else {
40
- disableSubmitInputElement();
41
- }
42
- };
43
- recaptchaWidget = grecaptcha.render('{{ include.recaptcha_widget_id | 'recaptcha-checkbox' }}', {
79
+ recaptchaWidget = grecaptcha.render('{{ include.recaptcha_widget_id | default: 'recaptcha-checkbox' }}', {
44
80
  'sitekey' : '{{ site.recaptcha.sitekey }}',
45
81
  'theme' : 'dark',
46
- 'callback' : verifyForm,
47
- 'expired-callback': disableSubmitInputElement,
48
- 'size' : 'compact'
82
+ 'size' : 'compact',
83
+ 'callback' : processContactRequest
49
84
  });
50
85
  };
86
+
87
+ modalWindowElement.addEventListener('click', hideModalWindow);
88
+ modalWindowElement.addEventListener('keyup', hideModalWindow);
51
89
  </script>
52
90
  <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
@@ -4,7 +4,14 @@
4
4
  <title>{{ include.title }} - {{ include.subtitle }}</title>
5
5
  <meta charset="utf-8" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
7
- <link rel="stylesheet" href="{{ 'assets/css/main.css' | absolute_url }}" />
7
+ <link rel="stylesheet" href="{{ 'assets/css/main.css' | absolute_url }}" media="all" />
8
+ <link rel="stylesheet" href="{{ 'assets/css/large.css' | absolute_url }}" media="screen and (min-width: 981px)" />
9
+ <link rel="stylesheet" href="{{ 'assets/css/medium.css' | absolute_url }}" media="screen and (min-width: 737px) and (max-width:980px)" />
10
+ <link rel="stylesheet" href="{{ 'assets/css/small.css' | absolute_url }}" media="screen and (max-width:736px)" />
11
+ <link rel="stylesheet" href="{{ 'assets/css/short.css' | absolute_url }}" media="screen and (min-aspect-ratio:16/7)" />
12
+ <link rel="preload" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,300i,400i&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet';this.media='all'">
13
+ <link rel="preload" href="{{ 'assets/css/fontawesome-all.min.css' | absolute_url }}" as="style" onload="this.onload=null;this.rel='stylesheet';this.media='all'">
14
+ <link rel="preload" href="{{ 'assets/css/cookieconsent.min.css' | absolute_url }}" as="style" onload="this.onload=null;this.rel='stylesheet';this.media='all'">
8
15
  {%- if include.stylesheets -%}
9
16
  {%- for file in include.stylesheets -%}
10
17
  <link rel="stylesheet" href="{{ file.url | absolute_url }}" />
@@ -17,5 +24,8 @@
17
24
  <link rel="icon" href="{{ site.favicon | absolute_url }}" />
18
25
  {%- endif -%}
19
26
  <noscript><link rel="stylesheet" href="{{ 'assets/css/noscript.css' | absolute_url }}" /></noscript>
27
+ <noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,300i,400i&display=swap" /></noscript>
28
+ <noscript><link rel="stylesheet" href="{{ 'assets/css/fontawesome-all.min.css' | absolute_url }}" /></noscript>
29
+ <noscript><link rel="stylesheet" href="{{ 'assets/css/cookieconsent.min.css' | absolute_url }}" /></noscript>
20
30
  {% seo %}
21
31
  </head>
@@ -5,19 +5,19 @@
5
5
  {%- assign submit_input_id="contact-submit-button" -%}
6
6
  {%- assign reset_input_id="contact-reset-button" -%}
7
7
  {%- assign recaptcha_widget_id="recaptcha-checkbox" -%}
8
- {%- assign onsubmit_callback="sendContactMessage" -%}
8
+ {%- assign onsubmit_callback="processContactRequest" -%}
9
9
  {%- assign onreset_callback="resetContactForm" -%}
10
-
10
+ {%- assign onfocusout_callback="toggleSubmitInputElement" -%}
11
11
  <div class="intro {{ include.style.header.color | default: 'color4' }}">
12
12
  <h2 class="major">{{ include.header.title | default: 'Contact'}}</h2>
13
13
  <p>{{ include.header.description }}</p>
14
14
  </div>
15
15
  <div class="inner columns divided">
16
16
  <div class="span-3-25">
17
- {% include contact_form.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 %}
17
+ {% include contact_form.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 %}
18
18
  </div>
19
19
  <div class="span-1-5">
20
20
  {% include social.html color=include.style.icons.color %}
21
21
  </div>
22
22
  </div>
23
- {% 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 %}
23
+ {% 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 %}
@@ -1,111 +1,85 @@
1
- <link rel="stylesheet" href="{{ 'assets/css/mapbox-gl.css' | absolute_url }}" />
2
- <style>
3
- body { margin: 0; padding: 0; }
4
- #map-container { position: relative; top: 0; bottom: 0; width: 100%; };
5
-
6
- #marker {
7
- background-size: cover;
8
- width: 50px;
9
- height: 50px;
10
- border-radius: 50%;
11
- cursor: pointer;
12
- }
13
-
14
- .mapboxgl-popup {
15
- max-width: 240px;
16
- }
17
-
18
- .mapboxgl-popup-close-button {
19
- display: none;
20
- }
21
-
22
- .mapboxgl-popup-content {
23
- color: #000000;
24
- max-width: 220px;
25
- }
26
-
27
- .mapboxgl-popup-content-wrapper {
28
- padding: 1%;
29
- }
30
- </style>
1
+ <link rel="stylesheet" href="{{ 'assets/css/mapbox-gl.min.css' | absolute_url }}" media="all">
2
+ <link rel="stylesheet" href="{{ 'assets/css/mapbox-gl.panel.min.css' | absolute_url }}" media="all">
31
3
  <div class="intro {{ include.style.header.joined }} {{ include.style.header.color }}">
32
4
  <h2 class="major">{{ include.header.title }}</h2>
33
5
  <p>{{ include.header.description }}</p>
34
6
  </div>
35
7
  <div id='map-container'></div>
36
- <script src="{{ 'assets/js/mapbox-gl.js' | absolute_url }}" /></script>
37
- <script defer>
38
- mapboxgl.accessToken = "{{ include.data.token }}";
39
- var map = new mapboxgl.Map({
40
- container: "map-container",
41
- style: "{{ include.data.style }}",
42
- center: [{{ include.data.center.longitude | default: 0.0 }}, {{ include.data.center.latitude | default: 0.0 }}],
43
- zoom: {{ include.data.zoom | default: 1 }},
44
- dragPan: true
45
- });
46
-
8
+ <script>
47
9
  var data_points;
48
- fetch("{{ include.data.file | absolute_url }}")
49
- .then(response => data_points = response.json())
50
- .then(json => data_points = json);
51
10
 
52
- map.on('load', function () {
53
-
54
- map.addLayer({
55
- "id": "points",
56
- "type": "symbol",
57
- "source": {
58
- "type": "geojson",
59
- "data": data_points
60
- },
61
- "layout": {
62
- // get the icon name from the source's "icon" property
63
- // concatenate the name to get an icon from the style's sprite sheet
64
- "icon-image": ["concat", ["get", "icon"], "-15"],
65
- "icon-size": 1,
66
- "icon-allow-overlap": true,
67
- // get the title name from the source's "title" property
68
- "text-field": ["get", "{{ include.data.markers.title | default: 'name' }}"],
69
- "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
70
- "text-offset": [0, 0.6],
71
- "text-anchor": "top"
72
- },
73
- "paint": {
74
- "icon-color": "#ffcc00",
75
- "icon-halo-color": "#2266AA",
76
- "text-color": "#ffffff"
77
- }
11
+ function fillMapContainer() {
12
+ fetch("{{ include.data.file | absolute_url }}")
13
+ .then(response => response.json())
14
+ .then(json => data_points = json);
15
+
16
+ mapboxgl.accessToken = "{{ include.data.token }}";
17
+ var map = new mapboxgl.Map({
18
+ container: "map-container",
19
+ style: "{{ include.data.style }}",
20
+ center: [{{ include.data.center.longitude | default: 0.0 }}, {{ include.data.center.latitude | default: 0.0 }}],
21
+ zoom: {{ include.data.zoom | default: 1 }},
22
+ dragPan: true
78
23
  });
79
24
 
80
- });
25
+ map.on('load', function () {
81
26
 
27
+ map.addLayer({
28
+ "id": "points",
29
+ "type": "symbol",
30
+ "source": {
31
+ "type": "geojson",
32
+ "data": data_points
33
+ },
34
+ "layout": {
35
+ // get the icon name from the source's "icon" property
36
+ // concatenate the name to get an icon from the style's sprite sheet
37
+ "icon-image": ["concat", ["get", "icon"], "-15"],
38
+ "icon-size": 1,
39
+ "icon-allow-overlap": true,
40
+ // get the title name from the source's "title" property
41
+ "text-field": ["get", "{{ include.data.markers.title | default: 'name' }}"],
42
+ "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
43
+ "text-offset": [0, 0.6],
44
+ "text-anchor": "top"
45
+ },
46
+ "paint": {
47
+ "icon-color": "#ffcc00",
48
+ "icon-halo-color": "#2266AA",
49
+ "text-color": "#ffffff"
50
+ }
51
+ });
82
52
 
83
- // When a click event occurs on a feature in the places layer, open a popup at the
84
- // location of the feature, with description HTML from its properties.
85
- map.on('click', 'points', function(e) {
86
- var coordinates = e.features[0].geometry.coordinates.slice();
87
- var description = e.features[0].properties.{{ include.data.markers.popup.text }};
88
-
89
- // Ensure that if the map is zoomed out such that multiple
90
- // copies of the feature are visible, the popup appears
91
- // over the copy being pointed to.
92
- while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
93
- coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
94
- }
95
-
96
- new mapboxgl.Popup()
97
- .setLngLat(coordinates)
98
- .setHTML(description)
99
- .addTo(map);
100
- });
101
-
53
+ });
54
+
55
+ // When a click event occurs on a feature in the places layer, open a popup at the
56
+ // location of the feature, with description HTML from its properties.
57
+ map.on('click', 'points', function(e) {
58
+ var coordinates = e.features[0].geometry.coordinates.slice();
59
+ var description = e.features[0].properties.{{ include.data.markers.popup.text }};
60
+
61
+ // Ensure that if the map is zoomed out such that multiple
62
+ // copies of the feature are visible, the popup appears
63
+ // over the copy being pointed to.
64
+ while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
65
+ coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
66
+ }
67
+
68
+ new mapboxgl.Popup()
69
+ .setLngLat(coordinates)
70
+ .setHTML(description)
71
+ .addTo(map);
72
+ });
73
+
102
74
  // Change the cursor to a pointer when the mouse is over the places layer.
103
- map.on('mouseenter', 'points', function() {
104
- map.getCanvas().style.cursor = 'pointer';
105
- });
106
-
75
+ map.on('mouseenter', 'points', function() {
76
+ map.getCanvas().style.cursor = 'pointer';
77
+ });
78
+
107
79
  // Change it back to a pointer when it leaves.
108
- map.on('mouseleave', 'points', function() {
109
- map.getCanvas().style.cursor = '';
110
- });
80
+ map.on('mouseleave', 'points', function() {
81
+ map.getCanvas().style.cursor = '';
82
+ });
83
+ }
111
84
  </script>
85
+ <script src="{{ 'assets/js/mapbox-gl.min.js' | absolute_url }}" onload="fillMapContainer()" defer ></script>