jekyll-theme-pirati 8.4.1 → 8.4.6

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: dec1a30972ab1d363153ffdf238e68a4f922b77b6d07281371414e734c311fc6
4
- data.tar.gz: 10613a24ce98a9c020ef365348a66dfda701ada666b51164d428916744c0a58e
3
+ metadata.gz: 58b1421700baf351c17b8533be343248a9ed2bfe571f380a504fcc22ce83debf
4
+ data.tar.gz: db888769563c94e61390eed42962742847f05fadef52b461693e95c0071aa568
5
5
  SHA512:
6
- metadata.gz: 5f41cd2ceb805a9b3714514315b5bf0c12a01282f17475d937e78f9827055051c229a0195683f04639173d3815841650b7b6152147f2e21c85170b3e7ebd44a7
7
- data.tar.gz: baa60d9abb4c239cfd5c315eb6ca3884acec9ef29fbd993a1fa7dbf7b172c5b3e13b2757519f3a8240f5df2c833a0630f5d83d53daf230976c0447e9abd2595f
6
+ metadata.gz: aa7b875ca81fd00159ed8793cd8042db185452a7ad1ffd482d31a2cd751df3e7f44b862854f3da645e089dd22b0d8d2e325d935f3f945aebf05def150c0718a7
7
+ data.tar.gz: 792216cf3091ec1dfebea817b42347ed24dbb345643f219573a8b770c56fa3501296d77aa6a0efbb300e88aae4a093bae7a94beb4155d00c899cb812d5d05ee5
@@ -28,8 +28,16 @@
28
28
  <div class="mb-4">
29
29
  {% include social-icon-group.html class="space-x-2 text-white pb-4" %}
30
30
  {% if site.organization.email %}
31
+ <div class="mb-2">
31
32
  {% capture href %}mailto:{{ site.organization.email }}{% endcapture %}
32
33
  {% include contact-line.html href=href icon="ico--envelope" caption="Dejte nám vědět" %}
34
+ </div>
35
+ {% endif %}
36
+ {% if site.github %}
37
+ <div class="mb-2">
38
+ {% capture href %}{{ site.github.url }}edit/{{ site.github.branch }}/{{ page.path }}{% endcapture %}
39
+ {% include contact-line.html href=href icon="ico--pencil" caption="Navrhni úpravu" %}
40
+ </div>
33
41
  {% endif %}
34
42
  </div>
35
43
  <div class="flex flex-col md:flex-row lg:flex-col lg:items-end space-y-2 md:space-y-0 md:space-x-2 lg:space-x-0 lg:space-y-2">
@@ -80,8 +88,14 @@
80
88
  <div class="grid gap-4 grid-cols-1 md:grid-cols-2 xl:grid-cols-3">
81
89
  {% if site.data.menu.contact %}
82
90
  {% for contact in site.data.menu.contact %}
83
- {% assign person = site.people | where_exp:"item","item.uid contains contact.id" | first %}
84
- {% include people/profile-badge.html item=person description=contact.position %}
91
+ {% if contact.id %}
92
+ {% assign person = site.people | where_exp:"item","item.uid contains contact.id" | first %}
93
+ {% assign description = contact.position %}
94
+ {% else %}
95
+ {% assign person = site.people | where_exp:"item","item.uid contains contact" | first %}
96
+ {% assign description = person.teamDescription['contact'] %}
97
+ {% endif %}
98
+ {% include people/profile-badge.html item=person description=description %}
85
99
  {% endfor %}
86
100
  {% else %}
87
101
  {% assign contactPerson = site.people | where_exp: "item","item.uid contains site.organization.contactUid" | first %}
@@ -100,4 +114,210 @@
100
114
  </footer>
101
115
 
102
116
 
117
+
118
+ <!-- Styles -->
119
+ <link rel="stylesheet" href="https://www.piratiastarostove.cz/static/elections2021/css/styleguide.min.css">
120
+ <link rel="stylesheet" href="https://www.piratiastarostove.cz/static/elections2021/css/styles.css">
121
+ <style type="text/css">
122
+ sup {
123
+ white-space: nowrap;
124
+ }
125
+ </style>
126
+
127
+
128
+
129
+ <div class=" bg-white">
130
+
131
+ <div class="row">
132
+ <section id="jakpomoci" class="lg:flex">
133
+ <div class="w-full">
134
+ <div class="cta-card cta-news px-8 py-8 bg-acidgreen text-black">
135
+ <p class="font-alt text-4xl">CHCI VĚDĚT VÍCE</p>
136
+ <form method="post" action="https://www.piratiastarostove.cz/prihlaseni-k-newsletteru/">
137
+ <input type="hidden" name="csrfmiddlewaretoken" value="ZerZ0grBRC8kdub1dHvoc9ISJrA6sICWtGgF8sIOZH6hrG2k2xKu5PwqiCqKcEya">
138
+ <input type="hidden" name="return_page_id" value="408">
139
+ <input name="email" type="email" class="text-input form-field__control w-full mt-7" value="" placeholder="Zadejte email" required="">
140
+ <button class="btn btn--icon my-2 text-lg w-full cta-btn">
141
+ <div class="btn__body-wrap">
142
+ <div class="btn__body py-4 leading-4 w-full">Přihlásit se k newsletteru</div>
143
+ <div class="btn__icon px-4 bg-grey-800 border-grey-500">
144
+ <i class="ico--chevron-right"></i>
145
+ </div>
146
+ </div>
147
+ </button>
148
+ <div class="checkbox form-field__control cta-cbox h-6">
149
+ <input type="checkbox" name="confirmed" id="confirmed_bottom" required="">
150
+ <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>
151
+ </div>
152
+ </form>
153
+ </div>
154
+ </div>
155
+
156
+ <div class="w-full">
157
+ <div class="cta-card cta-help px-8 py-8 bg-lemon " id="cta-card">
158
+ <p class="font-alt text-4xl w-1">CHCI POMÁHAT</p>
159
+
160
+ <a href="https://nalodeni.pirati.cz/kampan2021/" class="btn btn--icon text-lg w-full cta-button my-2">
161
+ <div class="btn__body-wrap">
162
+ <div class="btn__body py-4 leading-4 w-full">Chci pomáhat v kampani</div>
163
+ <div class="btn__icon px-4 bg-grey-800 border-grey-500">
164
+ <i class="ico--chevron-right"></i>
165
+ </div>
166
+ </div>
167
+ </a>
168
+ </div>
169
+ <script>
170
+ if (typeof window.initializehelp === 'undefined') {
171
+ window.initializehelp = function() {
172
+ let state = 0;
173
+ document.querySelectorAll('.cta-help-toggler').forEach(item => {
174
+ item.addEventListener("click", event => {
175
+ helpelement = event.target.closest(".cta-help");
176
+ let elements = helpelement.querySelectorAll(".cta-animated");
177
+ let elements2 = helpelement.querySelectorAll(".cta-animated-rev");
178
+ if (state === 0) {
179
+ [].forEach.call(elements, function(el) {
180
+ el.classList.remove("collapsed");
181
+ });
182
+ [].forEach.call(elements2, function(el) {
183
+ el.classList.add("collapsed");
184
+ });
185
+ state = 1;
186
+ } else {
187
+ [].forEach.call(elements2, function(el) {
188
+ el.classList.remove("collapsed");
189
+ });
190
+ [].forEach.call(elements, function(el) {
191
+ el.classList.add("collapsed");
192
+ });
193
+ state = 0;
194
+ }
195
+ });
196
+ });
197
+ }
198
+
199
+ window.addEventListener('load', function() {
200
+ initializehelp();
201
+ });
202
+ }
203
+
204
+ function isValidPhone(phoneNumber) {
205
+ var found = phoneNumber.search(/^[+]*[(]{0,1}[0-9]{1,3}[)]{0,1}[-\s\./0-9]{7,18}$/g);
206
+ if (found > -1) {
207
+ return true;
208
+ } else {
209
+ return false;
210
+ }
211
+ }
103
212
 
213
+ function isValidZip(zip) {
214
+ var found = zip.search(/^(?=.*\d)[\d ]{5,6}$/g);
215
+ if (found > -1) {
216
+ return true;
217
+ } else {
218
+ return false;
219
+ }
220
+ }
221
+ window.addEventListener('DOMContentLoaded', (event) => {
222
+ var elements = document.querySelectorAll("input, select");
223
+ for (var i = 0; i < elements.length; i++) {
224
+ if (elements[i].getAttribute("type") == "email") {
225
+ elements[i].onchange = function(e) {
226
+ e.target.setCustomValidity("");
227
+ e.target.checkValidity();
228
+ };
229
+ elements[i].oninvalid = function(e) {
230
+ if (e.target.value == "")
231
+ e.target.setCustomValidity(
232
+ "E-mail je povinná položka"
233
+ );
234
+ else
235
+ e.target.setCustomValidity(
236
+ "Neplatný e-mail"
237
+ );
238
+ }
239
+ } else if (elements[i].getAttribute("name") == "tel") {
240
+ elements[i].onchange = function(e) {
241
+ if (isValidPhone(e.target.value)) {
242
+ e.target.setCustomValidity("");
243
+ } else {
244
+ e.target.setCustomValidity("Telefonní číslo obsahuje chybu");
245
+ }
246
+ e.target.checkValidity();
247
+ };
248
+ elements[i].oninput = function(e) {
249
+ if (isValidPhone(e.target.value)) {
250
+ e.target.setCustomValidity("");
251
+ } else {
252
+ e.target.setCustomValidity("Telefonní číslo obsahuje chybu");
253
+ }
254
+ e.target.checkValidity();
255
+ };
256
+ elements[i].oninvalid = function(e) {
257
+ if (e.target.value == "")
258
+ e.target.setCustomValidity(
259
+ "Telefon je povinná položka"
260
+ );
261
+ };
262
+ } else if (elements[i].getAttribute("name") == "psc") {
263
+ elements[i].onchange = function(e) {
264
+ if (isValidZip(e.target.value)) {
265
+ e.target.setCustomValidity("");
266
+ } else {
267
+ e.target.setCustomValidity("PSČ číslo obsahuje chybu");
268
+ }
269
+ e.target.checkValidity();
270
+ };
271
+ elements[i].oninput = function(e) {
272
+ if (isValidZip(e.target.value)) {
273
+ e.target.setCustomValidity("");
274
+ } else {
275
+ e.target.setCustomValidity("PSČ číslo obsahuje chybu");
276
+ }
277
+ e.target.checkValidity();
278
+ };
279
+ elements[i].oninvalid = function(e) {
280
+ if (e.target.value == "")
281
+ e.target.setCustomValidity(
282
+ "PSČ je povinná položka"
283
+ );
284
+ };
285
+ } else {
286
+ elements[i].oninvalid = function(e) {
287
+ e.target.setCustomValidity("");
288
+ if (!e.target.validity.valid) {
289
+ e.target.setCustomValidity("Toto pole je povinné");
290
+ }
291
+ };
292
+ elements[i].onchange = function(e) {
293
+ e.target.setCustomValidity("");
294
+ };
295
+ }
296
+ }
297
+ });
298
+ </script>
299
+ </div>
300
+
301
+ <div class="w-full">
302
+ <div class="cta-card cta-support px-8 py-8 bg-white">
303
+ <p class="font-alt text-4xl w-1">CHCI PODPOŘIT</p>
304
+ <a href="https://dary.pirati.cz/projekty-kampane/piratiastarostove/" class="btn btn--icon text-lg w-full cta-btn my-2">
305
+ <div class="btn__body-wrap">
306
+ <div class="btn__body py-4 leading-4 w-full">Chci darovat na kampaň</div>
307
+ <div class="btn__icon px-4 bg-grey-800 border-grey-500">
308
+ <i class="ico--chevron-right"></i>
309
+ </div>
310
+ </div>
311
+ </a>
312
+ </div>
313
+ </div>
314
+ </section>
315
+ </div>
316
+ <div class="row">
317
+ <section class="bg-black py-4 lg:py-12">
318
+ <div class="medium-12 large-7 text-white" ><center>
319
+ <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>
320
+ </div>
321
+ </section>
322
+ </div>
323
+ </div>
@@ -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>
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.1
4
+ version: 8.4.6
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-11-16 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: []