jekyll-theme-pirati 8.4.0 → 8.4.5

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: 2dbfde991de21ef4a5db73761ddb4b85fd4c69d497e47fe959fdd8263d87814d
4
- data.tar.gz: d381268cc7b5b24169e514528dee49421e88ee41addfa558c3a6ded0e6b06a5b
3
+ metadata.gz: f1ebff15c0d14800a258356fb482ac46ec0cf3a2d871a9db7f7de2d3fd88234b
4
+ data.tar.gz: cada9b1aa242e1dc72700f8759d03fa24af4da154a36338f2517f1979e19c281
5
5
  SHA512:
6
- metadata.gz: 060feea377f69bb7c95d613cc2b7ff4fafc2d5da0dc540db8cd0facebf85ede0edec0b5b7bfeaa611c0763d4d5043791f642716cda969662e3c54cec74a3f2ef
7
- data.tar.gz: 466bb391e754273f024fbe8e2c247bb113dae35f8947f28c49e7caa3453dbe29a72de6f4637bc4e71c797f645a854b1cf973be3a55017c225f2f5d8be23ebb65
6
+ metadata.gz: 81ae8f56caee8ab87dc2e581525998863042c42fec861a495d5e0b75dcc2cc930109f80dfcc25734a04c9c498a337100d15f1fcc63f788df6010a13b1f3a71e3
7
+ data.tar.gz: 0fcce6bbaab20b14e6de1382702af6c8245aa35fa3440782097182461c9b4dc65b1b9ba9d8db124872e43c079b4966f1b5d125d91c2769c1186e5b739cba8bf1
@@ -95,9 +95,220 @@
95
95
  </div>
96
96
  </div>
97
97
  </section>
98
+ <section class="bg-black py-4 lg:py-12">
99
+
100
+ <!-- Styles -->
101
+ <link rel="stylesheet" href="https://www.piratiastarostove.cz/static/elections2021/css/styleguide.min.css">
102
+ <link rel="stylesheet" href="https://www.piratiastarostove.cz/static/elections2021/css/styles.css">
103
+ <style type="text/css">
104
+ sup {
105
+ white-space: nowrap;
106
+ }
107
+ </style>
108
+
109
+
110
+
111
+
112
+ <div class=" bg-white">
113
+ <div class="row bg-grey-700">
114
+
115
+ <div class="row">
116
+ <section id="jakpomoci" class="lg:flex">
117
+ <div class="w-full">
118
+ <div class="cta-card cta-news px-8 py-8 bg-acidgreen text-black">
119
+ <p class="font-alt text-4xl">CHCI VĚDĚT VÍCE</p>
120
+ <form method="post" action="https://www.piratiastarostove.cz/prihlaseni-k-newsletteru/">
121
+ <input type="hidden" name="csrfmiddlewaretoken" value="ZerZ0grBRC8kdub1dHvoc9ISJrA6sICWtGgF8sIOZH6hrG2k2xKu5PwqiCqKcEya">
122
+ <input type="hidden" name="return_page_id" value="408">
123
+ <input name="email" type="email" class="text-input form-field__control w-full mt-7" value="" placeholder="Zadejte email" required="">
124
+ <button class="btn btn--icon my-2 text-lg w-full cta-btn">
125
+ <div class="btn__body-wrap">
126
+ <div class="btn__body py-4 leading-4 w-full">Přihlásit se k newsletteru</div>
127
+ <div class="btn__icon px-4 bg-grey-800 border-grey-500">
128
+ <i class="ico--chevron-right"></i>
129
+ </div>
130
+ </div>
131
+ </button>
132
+ <div class="checkbox form-field__control cta-cbox h-6">
133
+ <input type="checkbox" name="confirmed" id="confirmed_bottom" required="">
134
+ <label for="confirmed_bottom" style="color: #000000"> Souhlasím se <a href="https://www.piratiastarostove.cz/zasady-ochrany-osobnich-udaju/" class="underline" target="_blank">zásadami ochrany osobních údajů</a> a zasíláním novinek</label>
135
+ </div>
136
+ </form>
137
+ </div>
98
138
  </div>
99
- </ui-app>
100
- </footer>
101
139
 
140
+ <div class="w-full">
141
+ <div class="cta-card cta-help px-8 py-8 bg-lemon " id="cta-card">
142
+ <p class="font-alt text-4xl w-1">CHCI POMÁHAT</p>
143
+
144
+ <a href="https://nalodeni.pirati.cz/kampan2021/" class="btn btn--icon text-lg w-full cta-button my-2">
145
+ <div class="btn__body-wrap">
146
+ <div class="btn__body py-4 leading-4 w-full">Chci se přidat k Pirátům</div>
147
+ <div class="btn__icon px-4 bg-grey-800 border-grey-500">
148
+ <i class="ico--chevron-right"></i>
149
+ </div>
150
+ </div>
151
+ </a>
152
+ </div>
153
+ <script>
154
+ if (typeof window.initializehelp === 'undefined') {
155
+ window.initializehelp = function() {
156
+ let state = 0;
157
+ document.querySelectorAll('.cta-help-toggler').forEach(item => {
158
+ item.addEventListener("click", event => {
159
+ helpelement = event.target.closest(".cta-help");
160
+ let elements = helpelement.querySelectorAll(".cta-animated");
161
+ let elements2 = helpelement.querySelectorAll(".cta-animated-rev");
162
+ if (state === 0) {
163
+ [].forEach.call(elements, function(el) {
164
+ el.classList.remove("collapsed");
165
+ });
166
+ [].forEach.call(elements2, function(el) {
167
+ el.classList.add("collapsed");
168
+ });
169
+ state = 1;
170
+ } else {
171
+ [].forEach.call(elements2, function(el) {
172
+ el.classList.remove("collapsed");
173
+ });
174
+ [].forEach.call(elements, function(el) {
175
+ el.classList.add("collapsed");
176
+ });
177
+ state = 0;
178
+ }
179
+ });
180
+ });
181
+ }
102
182
 
183
+ window.addEventListener('load', function() {
184
+ initializehelp();
185
+ });
186
+ }
103
187
 
188
+ function isValidPhone(phoneNumber) {
189
+ var found = phoneNumber.search(/^[+]*[(]{0,1}[0-9]{1,3}[)]{0,1}[-\s\./0-9]{7,18}$/g);
190
+ if (found > -1) {
191
+ return true;
192
+ } else {
193
+ return false;
194
+ }
195
+ }
196
+
197
+ function isValidZip(zip) {
198
+ var found = zip.search(/^(?=.*\d)[\d ]{5,6}$/g);
199
+ if (found > -1) {
200
+ return true;
201
+ } else {
202
+ return false;
203
+ }
204
+ }
205
+ window.addEventListener('DOMContentLoaded', (event) => {
206
+ var elements = document.querySelectorAll("input, select");
207
+ for (var i = 0; i < elements.length; i++) {
208
+ if (elements[i].getAttribute("type") == "email") {
209
+ elements[i].onchange = function(e) {
210
+ e.target.setCustomValidity("");
211
+ e.target.checkValidity();
212
+ };
213
+ elements[i].oninvalid = function(e) {
214
+ if (e.target.value == "")
215
+ e.target.setCustomValidity(
216
+ "E-mail je povinná položka"
217
+ );
218
+ else
219
+ e.target.setCustomValidity(
220
+ "Neplatný e-mail"
221
+ );
222
+ }
223
+ } else if (elements[i].getAttribute("name") == "tel") {
224
+ elements[i].onchange = function(e) {
225
+ if (isValidPhone(e.target.value)) {
226
+ e.target.setCustomValidity("");
227
+ } else {
228
+ e.target.setCustomValidity("Telefonní číslo obsahuje chybu");
229
+ }
230
+ e.target.checkValidity();
231
+ };
232
+ elements[i].oninput = function(e) {
233
+ if (isValidPhone(e.target.value)) {
234
+ e.target.setCustomValidity("");
235
+ } else {
236
+ e.target.setCustomValidity("Telefonní číslo obsahuje chybu");
237
+ }
238
+ e.target.checkValidity();
239
+ };
240
+ elements[i].oninvalid = function(e) {
241
+ if (e.target.value == "")
242
+ e.target.setCustomValidity(
243
+ "Telefon je povinná položka"
244
+ );
245
+ };
246
+ } else if (elements[i].getAttribute("name") == "psc") {
247
+ elements[i].onchange = function(e) {
248
+ if (isValidZip(e.target.value)) {
249
+ e.target.setCustomValidity("");
250
+ } else {
251
+ e.target.setCustomValidity("PSČ číslo obsahuje chybu");
252
+ }
253
+ e.target.checkValidity();
254
+ };
255
+ elements[i].oninput = function(e) {
256
+ if (isValidZip(e.target.value)) {
257
+ e.target.setCustomValidity("");
258
+ } else {
259
+ e.target.setCustomValidity("PSČ číslo obsahuje chybu");
260
+ }
261
+ e.target.checkValidity();
262
+ };
263
+ elements[i].oninvalid = function(e) {
264
+ if (e.target.value == "")
265
+ e.target.setCustomValidity(
266
+ "PSČ je povinná položka"
267
+ );
268
+ };
269
+ } else {
270
+ elements[i].oninvalid = function(e) {
271
+ e.target.setCustomValidity("");
272
+ if (!e.target.validity.valid) {
273
+ e.target.setCustomValidity("Toto pole je povinné");
274
+ }
275
+ };
276
+ elements[i].onchange = function(e) {
277
+ e.target.setCustomValidity("");
278
+ };
279
+ }
280
+ }
281
+ });
282
+ </script>
283
+ </div>
284
+
285
+ <div class="w-full">
286
+ <div class="cta-card cta-support px-8 py-8 bg-white">
287
+ <p class="font-alt text-4xl w-1 text-black">CHCI PODPOŘIT</p>
288
+ <a href="https://dary.pirati.cz/projekty-kampane/" class="btn btn--icon text-lg w-full cta-btn my-2">
289
+ <div class="btn__body-wrap">
290
+ <div class="btn__body py-4 leading-4 w-full">Chci darovat Pirátům</div>
291
+ <div class="btn__icon px-4 bg-grey-800 border-grey-500">
292
+ <i class="ico--chevron-right"></i>
293
+ </div>
294
+ </div>
295
+ </a>
296
+ </div>
297
+ </div>
298
+ </section>
299
+ </div>
300
+
301
+ </div>
302
+ </div>
303
+ <div class="row">
304
+ <section class="bg-black py-4 lg:py-12">
305
+ <div class="medium-12 large-7 text-white" ><center>
306
+ <a href="https://www.pirati.cz/o-nas/ochrana-osobnich-udaju/">Zásady zpracování osobních údajů a informace o využití cookies</a></center>
307
+ </div>
308
+ </section>
309
+ </div>
310
+
311
+ </section>
312
+ </div>
313
+ </ui-app>
314
+ </footer>
@@ -67,7 +67,7 @@
67
67
  </ui-app>
68
68
  </nav>
69
69
 
70
- <div class="__js-root">
70
+ <div class="__js-root" @click="replaceHTMLEnts();">
71
71
  <ui-app inline-template>
72
72
  {% if site.env.GOOGLE_CALENDAR_APIKEY and site.calendar.id %}
73
73
  <ui-calendar-google-provider v-slot="{ events, onShowMore, hasMore }" :calendar-id="'{{ site.calendar.id }}'" :api-key="'{{ site.env.GOOGLE_CALENDAR_APIKEY }}'">
@@ -78,14 +78,14 @@
78
78
  <nav class="subnav">
79
79
  <div class="container container--wide">
80
80
  <div class="flex">
81
- <button @click="toggleView('regions')" class="btn btn--condensed btn--grey-500 btn--hoveractive btn--to-white text-sm mr-2" :class="{'btn--activated': isCurrentView('regions')}">
81
+ <button @click="toggleView('regions');" class="btn btn--condensed btn--grey-500 btn--hoveractive btn--to-white text-sm mr-2" :class="{'btn--activated': isCurrentView('regions')}">
82
82
  <div class="btn__body">
83
83
  <span>{{ site.organization.name }}</span>
84
84
  <i class="ico--chevron-down ml-4"></i>
85
85
  </div>
86
86
  </button>
87
87
 
88
- <button @click="toggleView('calendar')" class="btn btn--inline-icon btn--condensed btn--hoveractive btn--grey-500 btn--to-orange-300 text-sm" :class="{'btn--activated': isCurrentView('calendar')}">
88
+ <button @click="toggleView('calendar');replaceHTMLEnts();" class="btn btn--inline-icon btn--condensed btn--hoveractive btn--grey-500 btn--to-orange-300 text-sm" :class="{'btn--activated': isCurrentView('calendar')}">
89
89
  <div class="btn__body">
90
90
  <i class="btn__inline-icon ico--calendar mr-0 md:mr-2 text-orange-300"></i>
91
91
  <span class="hidden md:block">{{ site.calendar.title }}</span>
@@ -93,7 +93,7 @@
93
93
  </button>
94
94
 
95
95
  {% if calendarProvided %}
96
- <a href="#" class="btn text-sm max-w-full hidden lg:block" @click="toggleView('calendar')" v-if="events.length > 0" v-cloak>
96
+ <a href="#" class="btn text-sm max-w-full hidden lg:block" @click="toggleView('calendar');" v-if="events.length > 0" v-cloak>
97
97
  <div class="btn__body bg-grey-800 text-grey-200 flex divide-x">
98
98
  <span class="pr-4">&#123;{events[0].title}&#125;</span>
99
99
  <span class="pl-4">&#123;{events[0].allDay ? 'Celý den' : events[0].startDateVerbose + ', ' + events[0].startTimeVerbose}&#125;</span>
@@ -119,7 +119,7 @@
119
119
  <ui-region-map class="container container--default" />
120
120
  </div>
121
121
  <div class="subnav-aside__item" :class="{'subnav-aside__item--visible': isCurrentView('calendar')}">
122
- <a @click="toggleView('calendar')" class="subnav-aside__close"><i class="ico--close"></i></a>
122
+ <a @click="toggleView('calendar');replaceHTMLEnts();" class="subnav-aside__close"><i class="ico--close"></i></a>
123
123
  <div class="container container--default">
124
124
  {% if calendarProvided %}
125
125
  <ui-calendar-renderer :events="events" :on-show-more="onShowMore" :has-more="hasMore" :name="'{{ site.calendar.title }}'"></ui-calendar-renderer>
@@ -141,3 +141,27 @@
141
141
  {% endif %}
142
142
  </ui-app>
143
143
  </div>
144
+ <script>
145
+ function replaceHTMLEnts() {
146
+ // Get all <p> elements in the document
147
+ var x = document.querySelectorAll("p");
148
+ var i;
149
+ for (i = 0; i < x.length; i++) {
150
+ x[i].innerHTML=htmlDecode(x[i].innerHTML);
151
+
152
+ }
153
+ x = document.querySelectorAll("a");
154
+ for (i = 0; i < x.length; i++) {
155
+ if (x[i].hasOwnProperty("font-bold") && x[i].hasOwnProperty("block")) {
156
+ x[i].innerHTML=htmlDecode(x[i].innerHTML);
157
+ }
158
+ }
159
+ }
160
+
161
+ function htmlDecode(input){
162
+ var e = document.createElement('div');
163
+ e.innerHTML = input;
164
+ return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
165
+ }
166
+
167
+ </script>
@@ -42,7 +42,7 @@
42
42
  </script>
43
43
  {% endif %}
44
44
 
45
- {% if site.piwik.loadSDK %}
45
+ {% if site.matomo.loadSDK %}
46
46
  <!-- Matomo -->
47
47
  <script type="text/javascript">
48
48
  var _paq = window._paq || [];
@@ -52,7 +52,7 @@
52
52
  (function() {
53
53
  var u="//matomo.pirati.cz/";
54
54
  _paq.push(['setTrackerUrl', u+'matomo.php']);
55
- _paq.push(['setSiteId', '110']);
55
+ _paq.push(['setSiteId', '{{ site.matomo.siteId }}']);
56
56
  var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
57
57
  g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
58
58
  })();
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-pirati
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.4.0
4
+ version: 8.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jitka Novotná
8
8
  - Filip Vařecha
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-02 00:00:00.000000000 Z
12
+ date: 2021-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -53,7 +53,7 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '10.0'
56
- description:
56
+ description:
57
57
  email:
58
58
  - jitka@ucw.cz
59
59
  - filip.varecha@pirati.cz
@@ -303,7 +303,7 @@ homepage: https://github.com/pirati-web/jekyll-theme-pirati#readme
303
303
  licenses:
304
304
  - MIT
305
305
  metadata: {}
306
- post_install_message:
306
+ post_install_message:
307
307
  rdoc_options: []
308
308
  require_paths:
309
309
  - lib
@@ -318,9 +318,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
318
  - !ruby/object:Gem::Version
319
319
  version: '0'
320
320
  requirements: []
321
- rubyforge_project:
321
+ rubyforge_project:
322
322
  rubygems_version: 2.7.6
323
- signing_key:
323
+ signing_key:
324
324
  specification_version: 4
325
325
  summary: Basic theme for Czech pirate party
326
326
  test_files: []