jekyll-theme-pirati 8.3.0 → 8.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c32e07b4dd38c81020860c70b1375006019adf5a8f396c98433ef81f2e1a1b7
4
- data.tar.gz: 5fa295a29f5f7c77e9a853149c06c3cb0356dc124d42eab87e6f38ea38e0d18e
3
+ metadata.gz: 8df541636615d92bbbf31aac367a5a4d87337c386507e7628bf677001d3378a5
4
+ data.tar.gz: 9faafdc458624cf47235b17c969ed12cfe973aa0aeb2225c820e52e05c2d5374
5
5
  SHA512:
6
- metadata.gz: 3eb4832cd877487a241168c482fc8e16bdd8eeb7c237a6293eb8dd74105ff2a9d82b650a02e2b5a51b52a86475a60b223812b534b65e7b8184215ed0ee7fc463
7
- data.tar.gz: 511c35ad6f4cbab814375efe11d05c66cec390e36b2df021d8709105e07a24bea04173fa4e24762cf74899f17987b580792c9c95bda68b6cb486ddf0d6a6d4a0
6
+ metadata.gz: 03bdaa94990f9716a78d1892761e71c6407d88e0c2d296ccfe406dae79b5db3f210800bf998928dc2cb2598691ab4b4085fd87bb3920440fb32dc7aa46da9411
7
+ data.tar.gz: 3901498ffb9bb595f87552a5b6cc40b6652fc1a4cffb0172ffc3bd411b9fe15b2fee070dfb11ae753811e310ba118ead327d2ab52cb71d9dfa6c913b8adb4272
data/README.md CHANGED
@@ -106,6 +106,12 @@ To use it fully, provide `heroImg` in the person markdown file.
106
106
 
107
107
  These will show as the [emphasized variant in black](https://styleguide.pir-test.eu/latest/?p=viewall-molecules-article-card).
108
108
 
109
+ #### Organizations can personalise their onboard and donate links in header and footer
110
+
111
+ Set `organization.donateLink` (defaults to dary.pirati.cz) and
112
+ `organization.onboardingLink` (defaults to nalodeni.pirati.cz) in the Jekyll
113
+ config.
114
+
109
115
 
110
116
  ### Backwards incompatible changes
111
117
 
@@ -0,0 +1,21 @@
1
+ {% if include.bgImg %}
2
+ {% if site.mediaStorage %}
3
+ {% capture imgBgPath %}https://a.pirati.cz/{{ site.mediaStorage }}/img/{{ include.bgImg }}{% endcapture %}
4
+ {% else %}
5
+ {% capture imgBgPath %}{% asset '{{ include.bgImg }}' @path %}{% endcapture %}
6
+ {% assign imgBgPath = imgBgPath | absolute_url %}
7
+ {% endif %}
8
+ {% endif %}
9
+
10
+ {% if include.mainContent %}
11
+ {% capture mainContent %}{{ include.mainContent }}{% endcapture %}
12
+ {% else %}
13
+ {% capture mainContent %}
14
+ {% if include.candidateListNumber %}
15
+ <div class="flag bg-violet-400 text-white head-alt-base mb-6">Volte č. {{ include.candidateListNumber }}</div>
16
+ {% endif %}
17
+ <h1 class="head-alt-md md:head-alt-xl">{{ page.title }}</h1>
18
+ {% endcapture %}
19
+ {% endif %}
20
+
21
+ {% include hero/advanced.html img=include.img bgImg=imgBgPath mainContent=mainContent subContent=include.subContent contentClass="content-block" imgClass="h-32 lg:h-80 lg:m-auto hidden md:block" %}
@@ -95,9 +95,11 @@
95
95
  </div>
96
96
  </div>
97
97
  </section>
98
+ <section class="bg-black py-4 lg:py-12">
99
+ <div class="medium-12 large-7 text-white" ><center><hr></hr>
100
+ <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>
101
+ </div>
102
+ </section>
98
103
  </div>
99
104
  </ui-app>
100
- </footer>
101
-
102
-
103
-
105
+ </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
  })();
@@ -15,33 +15,23 @@ layout: default
15
15
  {% endif %}
16
16
  {% endif %}
17
17
 
18
- {% if page.heroBgImg %}
19
- {% if site.mediaStorage %}
20
- {% capture imgBgPath %}https://a.pirati.cz/{{ site.mediaStorage }}/img/{{ page.heroBgImg }}{% endcapture %}
21
- {% else %}
22
- {% capture imgBgPath %}{% asset '{{ page.heroBgImg }}' @path %}{% endcapture %}
23
- {% assign imgBgPath = imgBgPath | absolute_url %}
24
- {% endif %}
25
- {% endif %}
26
18
 
27
19
  <div class="__js-root">
28
- <ui-view-provider inline-template :initial="{candidates: true, program: false}" v-slot="{ isCurrentView, toggleView }">
20
+ <ui-view-provider inline-template :initial="{kandidati: true, program: false}" :sync-location="true" location-param="pohled" v-slot="{ isCurrentView, showView }">
29
21
  <main>
30
- {% capture mainContent %}
31
- {% if candidates.number %}
32
- <div class="flag bg-violet-400 text-white head-alt-base mb-6">Volte č. {{ candidates.number }}</div>
33
- {% endif %}
34
- <h1 class="head-alt-md md:head-alt-xl">{{ page.title }}</h1>
35
- {% endcapture %}
36
- {% include hero/advanced.html img=page.img bgImg=imgBgPath mainContent=mainContent subContent=content contentClass="content-block" imgClass="h-32 lg:h-80 lg:m-auto hidden md:block" %}
22
+ {% comment %} Support for customized elections header content. {% endcomment %}
23
+ {% if page.customizeHeader %}
24
+ {{ content }}
25
+ {% else %}
26
+ {% include elections-header.html img=page.img bgImg=page.heroBgImg subContent=content candidateListNumber=candidates.number %}
27
+ {% endif %}
37
28
 
38
29
  <div class="container container--default pt-8 {% unless group.subLinks %}pb-8{% endunless %} lg:py-24">
39
-
40
30
  {% if programCategories.size > 0 %}
41
31
  <div class="text-center">
42
32
  <div class="switch">
43
- <a @click="toggleView('candidates')" class="switch__item" :class="{'switch__item--active': isCurrentView('candidates')}">Kandidáti</a>
44
- <a @click="toggleView('program')" class="switch__item" :class="{'switch__item--active': isCurrentView('program')}">Program</a>
33
+ <a @click="showView('kandidati')" class="switch__item" :class="{'switch__item--active': isCurrentView('kandidati')}">Kandidáti</a>
34
+ <a @click="showView('program')" class="switch__item" :class="{'switch__item--active': isCurrentView('program')}">Program</a>
45
35
  </div>
46
36
  </div>
47
37
 
@@ -77,7 +67,7 @@ layout: default
77
67
  </template>
78
68
  {% endif %}
79
69
 
80
- <template v-if="isCurrentView('candidates')">
70
+ <template v-if="isCurrentView('kandidati')">
81
71
  <h1 class="head-alt-md text-center py-8 lg:pt-24 lg:pb-8">{{ candidates.title }}</h1>
82
72
 
83
73
  {% assign leaderCandidate = site.people | where: "uid", candidates.leader.uid | first %}
@@ -102,7 +92,6 @@ layout: default
102
92
  {% endif %}
103
93
 
104
94
  {% include candidate-badge.html candidate=candidate candidatePage=candidatePage leader=false rank=candidateRank wrapperClass=classes hideSocialProfiles=page.hideCandidateSocialProfiles %}
105
-
106
95
  {% endfor %}
107
96
  {% endif %}
108
97
  </div>
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.3.0
4
+ version: 8.4.4
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-07-29 00:00:00.000000000 Z
12
+ date: 2021-10-01 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
@@ -87,6 +87,7 @@ files:
87
87
  - _includes/contacts/summary-table.html
88
88
  - _includes/countdown.html
89
89
  - _includes/disqus_comments.html
90
+ - _includes/elections-header.html
90
91
  - _includes/footer.html
91
92
  - _includes/google-analytics.html
92
93
  - _includes/head-custom.html
@@ -302,7 +303,7 @@ homepage: https://github.com/pirati-web/jekyll-theme-pirati#readme
302
303
  licenses:
303
304
  - MIT
304
305
  metadata: {}
305
- post_install_message:
306
+ post_install_message:
306
307
  rdoc_options: []
307
308
  require_paths:
308
309
  - lib
@@ -317,9 +318,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
318
  - !ruby/object:Gem::Version
318
319
  version: '0'
319
320
  requirements: []
320
- rubyforge_project:
321
+ rubyforge_project:
321
322
  rubygems_version: 2.7.6
322
- signing_key:
323
+ signing_key:
323
324
  specification_version: 4
324
325
  summary: Basic theme for Czech pirate party
325
326
  test_files: []