jekyll-theme-conference 5.4.0 → 5.4.1

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: 2148bd55f7b570f144c64f45ef11ef33d3d5be152f7dfbfde013f430c1540d6f
4
- data.tar.gz: 9e944b7a6fdbad5b1a1338821ed1b95dd2c928ec6ab45d95c24ff76aac86b023
3
+ metadata.gz: 2446a860765495a88480d567ce98b6ce98a777af5108a65393ef59e438433a98
4
+ data.tar.gz: 2cb54b3190da7fc076c5168b95b7c32b827f88edbd903453663b950f0ce09a23
5
5
  SHA512:
6
- metadata.gz: 7aa2c707e6871be48c78cc21d702a978cb5548adf4a270393761bebfe43eb4f16ce4943f7266ede4e3064390accca9f8a3f13a51173c5fd7d0d9db9140d3fd95
7
- data.tar.gz: 4fb7645b059c7568e9f087366e8b2a6b0e91d0bcf95eaf4e6201b8d52e5157c8b28c37c3cb0ca0325c03d3c51f9164f6188d155f00d473a6a4591ce75a92508e
6
+ metadata.gz: d26a9e8915cd06a2f92ed2d209d333839ef9c7806c6fc450dba36483ca13277766d322b1e70ab6af2b07bcca89050746c3499e933a08a19e3775dd8d3748bfb6
7
+ data.tar.gz: bd0aa85da3e56d53063d350da67cc4398cd06ab8c7c545c19c738a93b8b9fc7d609a05e3daf0924107a1fee90cce25a980f6e391349dbeaad02e3ccdc912aa68
data/README.md CHANGED
@@ -131,15 +131,15 @@ To install:
131
131
  bundle
132
132
  ```
133
133
 
134
- 4. Add `remote_theme: "DigitaleGesellschaft/jekyll-theme-conference@v5.4.0"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
134
+ 4. Add `remote_theme: "DigitaleGesellschaft/jekyll-theme-conference@v5.4.1"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
135
135
 
136
136
  ```yaml
137
- remote_theme: "DigitaleGesellschaft/jekyll-theme-conference@v5.4.0"
137
+ remote_theme: "DigitaleGesellschaft/jekyll-theme-conference@v5.4.1"
138
138
  ```
139
139
 
140
140
  5. Continue with the [_Setup_](#setup) section below to customize the theme and add content for your conference.
141
141
 
142
- To update the theme, change the version tag in the `remote_theme` value (e.g., `@v5.3.0` to `@v5.4.0`).
142
+ To update the theme, change the version tag in the `remote_theme` value (e.g., `@v5.4.0` to `@v5.4.1`).
143
143
 
144
144
 
145
145
  ## Setup
@@ -626,7 +626,7 @@ The theme includes built-in support for Progressive Web App (PWA) functionality,
626
626
 
627
627
  Short notices of the app appear as a toast at the bottom of the page (in the app above its navigation bar), one at a time:
628
628
 
629
- - On phones and tablets (iOS and Android), a toast invites visitors to install the app. Its button opens the browser's install prompt where available (Chrome on Android), otherwise a panel at the bottom explaining in three steps how to add the app to the home screen. Closing the toast hides it for 30 days. It is not shown on desktops, within the installed app or on past [editions](#editions). Set `install_toast: false` to turn it off.
629
+ - On phones and tablets (iOS and Android), a toast invites visitors to install the app. Its button opens the browser's install prompt where available (Chrome on Android), otherwise a panel at the bottom explaining in three steps how to add the app to the home screen. Closing the toast or opening its install steps hides it for 30 days. It is not shown on desktops, within the installed app, on past [editions](#editions) or without `icons`. Set `install_toast: false` to turn this toast off.
630
630
  - Within the app, once a new build of the site changed (e.g. a schedule change), a toast offers to reload all modified pages. Rebuilding the site alone does not count as a change.
631
631
 
632
632
  > [!NOTE]
@@ -2,4 +2,4 @@
2
2
  css/conference-only.bundle.css: "12ebeda786"
3
3
  css/conference.bundle.css: "faf83cc57a"
4
4
  css/map.bundle.css: "3104fafcdf"
5
- js/conference.bundle.js: "7e8a4f77bd"
5
+ js/conference.bundle.js: "782f55be9f"
data/_data/lang.yml CHANGED
@@ -15,6 +15,8 @@ en:
15
15
  title: "Page not found"
16
16
  text: "This page does not exist (anymore)."
17
17
  home: "Go to the home page"
18
+ offline_title: "Not available offline"
19
+ offline_text: "This page has not been stored on this device. Open it again once you are online."
18
20
  navigation:
19
21
  main: Main navigation
20
22
  toggle: Toggle navigation menu
@@ -100,6 +102,8 @@ de:
100
102
  title: "Seite nicht gefunden"
101
103
  text: "Diese Seite gibt es nicht (mehr)."
102
104
  home: "Zur Startseite"
105
+ offline_title: "Offline nicht verfügbar"
106
+ offline_text: "Diese Seite ist auf diesem Gerät nicht gespeichert. Öffnen Sie sie wieder, sobald Sie online sind."
103
107
  navigation:
104
108
  main: Hauptnavigation
105
109
  toggle: Navigationsmenü umschalten
@@ -185,6 +189,8 @@ fr:
185
189
  title: "Page introuvable"
186
190
  text: "Cette page n'existe pas (ou plus)."
187
191
  home: "Aller à la page d'accueil"
192
+ offline_title: "Non disponible hors ligne"
193
+ offline_text: "Cette page n'est pas enregistrée sur cet appareil. Ouvrez-la à nouveau une fois en ligne."
188
194
  navigation:
189
195
  main: Navigation principale
190
196
  toggle: Basculer le menu de navigation
@@ -270,6 +276,8 @@ pt:
270
276
  title: "Página não encontrada"
271
277
  text: "Esta página não existe (mais)."
272
278
  home: "Ir para a página inicial"
279
+ offline_title: "Indisponível offline"
280
+ offline_text: "Esta página não está guardada neste dispositivo. Abra-a novamente quando estiver online."
273
281
  navigation:
274
282
  main: Navegação principal
275
283
  toggle: Alternar menu de navegação
@@ -10,10 +10,15 @@
10
10
 
11
11
  {%- include get_location_config.html -%}
12
12
  {%- if location_map %}
13
+ {%- comment -%}
14
+ Numbers as numbers, also from a YAML list (e.g. [47.37, 8.54]) or a
15
+ quoted value: a malformed value must not break the JSON (all modules)
16
+ {%- endcomment -%}
17
+ {%- assign home_coord = location_map.home_coord | default: '47.3744489, 8.5410422' | join: "," | split: "," -%}
13
18
  "map": {
14
19
  "map_provider": {{ location_map.map_provider | default: 'OpenStreetMap.Mapnik' | jsonify }},
15
- "home_coord": [{{ location_map.home_coord | default: '47.3744489, 8.5410422' }}],
16
- "default_zoom": {{ location_map.default_zoom | default: 17 }}
20
+ "home_coord": [{{ home_coord[0] | strip | plus: 0 | jsonify }}, {{ home_coord[1] | strip | plus: 0 | jsonify }}],
21
+ "default_zoom": {{ location_map.default_zoom | default: 17 | plus: 0 | jsonify }}
17
22
  {%- if location_map.script %},
18
23
  "script": {{ location_map.script | prepend: '/assets/js/' | prepend: site.baseurl | jsonify }}
19
24
  {%- endif %}
@@ -41,15 +46,15 @@
41
46
 
42
47
  {% if edition_live.streaming.enable -%}
43
48
  "stream": {
44
- "pause": {{ edition_live.streaming.pause | default: 60 }},
45
- "prepend": {{ edition_live.streaming.prepend | default: 5 }},
46
- "extend": {{ edition_live.streaming.extend | default: 5 }}
49
+ "pause": {{ edition_live.streaming.pause | default: 60 | plus: 0 | jsonify }},
50
+ "prepend": {{ edition_live.streaming.prepend | default: 5 | plus: 0 | jsonify }},
51
+ "extend": {{ edition_live.streaming.extend | default: 5 | plus: 0 | jsonify }}
47
52
  },
48
53
  {%- endif %}
49
54
 
50
55
  {% if site.conference.pwa -%}
51
56
  "pwa": {
52
- "enable": {{ site.conference.pwa.enable | default: false }}
57
+ "enable": {{ site.conference.pwa.enable | default: false | jsonify }}
53
58
  },
54
59
  {%- endif %}
55
60
 
@@ -4,7 +4,7 @@
4
4
  <a
5
5
  class="{{ include.class }}"
6
6
  href="{{ edition_live.streaming.external }}"
7
- title="{{ stream_label }}"
7
+ title="{{ stream_label | escape }}"
8
8
  >
9
9
  {%- else -%}
10
10
  {%- if r -%}
@@ -28,7 +28,7 @@
28
28
  <a
29
29
  class="{{ include.class }}{% if include.is_active %} active{% endif %}"
30
30
  href="{{ stream_href | escape }}"
31
- title="{{ stream_label }}"
31
+ title="{{ stream_label | escape }}"
32
32
  {%- if include.is_active %}
33
33
  aria-current="page"
34
34
  {%- endif %}
@@ -20,12 +20,16 @@
20
20
  {%- include get_talk_timestamp.html -%}
21
21
 
22
22
  {%- assign last_pause = timestamp_start | minus: last_end -%}
23
+ {%- assign starts_block = false -%}
24
+ {%- if forloop.index0 == 0 or last_pause >= min_pause -%}
25
+ {%- assign starts_block = true -%}
26
+ {%- endif -%}
23
27
 
24
- {%- if forloop.last == true or last_pause >= min_pause and forloop.index0 > 0 -%}
25
- {%- if forloop.last -%}
26
- {%- assign last_end = timestamp_end -%}
27
- {%- endif -%}
28
-
28
+ {%- comment -%}
29
+ A long pause ends the previous block, before the talk starts a new
30
+ one (also the room's last talk): one end per start, in order
31
+ {%- endcomment -%}
32
+ {%- if starts_block and forloop.index0 > 0 -%}
29
33
  {%- assign live_end = offset_end | times: 60 | plus: last_end %}
30
34
  {%- if live_ends == "" -%}
31
35
  {%- assign live_ends = live_end -%}
@@ -34,7 +38,7 @@
34
38
  {%- endif -%}
35
39
  {%- endif -%}
36
40
 
37
- {%- if forloop.index0 == 0 or last_pause >= min_pause -%}
41
+ {%- if starts_block -%}
38
42
  {%- assign live_start = offset_start | times: -60 | plus: timestamp_start -%}
39
43
  {%- if live_starts == "" -%}
40
44
  {%- assign live_starts = live_start -%}
@@ -43,6 +47,15 @@
43
47
  {%- endif -%}
44
48
  {%- endif -%}
45
49
 
50
+ {%- if forloop.last -%}
51
+ {%- assign live_end = offset_end | times: 60 | plus: timestamp_end %}
52
+ {%- if live_ends == "" -%}
53
+ {%- assign live_ends = live_end -%}
54
+ {%- else -%}
55
+ {%- assign live_ends = live_ends | append: "," | append: live_end -%}
56
+ {%- endif -%}
57
+ {%- endif -%}
58
+
46
59
  {%- assign last_end = timestamp_end -%}
47
60
  {%- endfor -%}
48
61
  {%- endfor -%}
@@ -3,10 +3,15 @@
3
3
  {%- comment -%}
4
4
  Parsed in the site's timezone (Jekyll `timezone` sets TZ during the build)
5
5
  {%- endcomment -%}
6
- {%- assign datetime_start = d.date | append: "T" | append: talk_start | append: ":00" -%}
7
- {%- assign add_days_start = talk_start_day | times: 24 | times: 60 | times: 60 -%}
8
- {%- assign timestamp_start = datetime_start | date: "%s" | plus: add_days_start | date: "%s" -%}
6
+ {%- comment -%}
7
+ Talks after midnight (e.g. 25:30, talk_start_day 1) on the following date,
8
+ counted from noon: whole days of 24 hours would be off by one hour across
9
+ a change to or from daylight saving time
10
+ {%- endcomment -%}
11
+ {%- assign add_days_start = talk_start_day | times: 86400 -%}
12
+ {%- assign date_start = d.date | append: "T12:00:00" | date: "%s" | plus: add_days_start | date: "%Y-%m-%d" -%}
13
+ {%- assign timestamp_start = date_start | append: "T" | append: talk_start | append: ":00" | date: "%s" -%}
9
14
 
10
- {%- assign datetime_end = d.date | append: "T" | append: talk_end | append: ":00" -%}
11
- {%- assign add_days_end = talk_end_day | times: 24 | times: 60 | times: 60 -%}
12
- {%- assign timestamp_end = datetime_end | date: "%s" | plus: add_days_end | date: "%s" -%}
15
+ {%- assign add_days_end = talk_end_day | times: 86400 -%}
16
+ {%- assign date_end = d.date | append: "T12:00:00" | date: "%s" | plus: add_days_end | date: "%Y-%m-%d" -%}
17
+ {%- assign timestamp_end = date_end | append: "T" | append: talk_end | append: ":00" | date: "%s" -%}
@@ -10,7 +10,7 @@
10
10
  <title>
11
11
  {{- page_title | escape -}}
12
12
  {%- unless page_title == empty %} - {% endunless -%}
13
- {{- edition_title -}}
13
+ {{- edition_title | escape -}}
14
14
  </title>
15
15
  {% include list_header_meta.html %}
16
16
 
@@ -34,9 +34,11 @@
34
34
 
35
35
  {%- comment -%}
36
36
  Before the first paint (no flash): colour mode and installed app (PWA).
37
+ Also keeps Chrome's install prompt, which may come before the deferred
38
+ scripts run (_js/modules/pwa.js shows it from its install toast).
37
39
  Static content, i.e. one hash for a Content Security Policy (see README).
38
40
  {%- endcomment %}
39
- <script>{ const root = document.documentElement; root.dataset.bsTheme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; root.dataset.pwa = "pwaEnable" in root.dataset && (navigator.standalone === true || matchMedia("(display-mode: standalone)").matches); }</script>
41
+ <script>{ const root = document.documentElement; root.dataset.bsTheme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; root.dataset.pwa = "pwaEnable" in root.dataset && (navigator.standalone === true || matchMedia("(display-mode: standalone)").matches); if ("pwaEnable" in root.dataset) addEventListener("beforeinstallprompt", (event) => { event.preventDefault(); window.conferenceInstallPrompt = event; }); }</script>
40
42
  </head>
41
43
 
42
44
  <body class="min-vh-100">
@@ -49,11 +51,11 @@
49
51
 
50
52
  {%- assign home_url = edition_base | append: "/" -%}
51
53
  {%- unless page.url == home_url -%}
52
- <!-- site title (print only): -->
54
+ <!-- site title (print only, not a heading: the page has its own h1): -->
53
55
  <div class="container d-none d-print-block mt-4 mb-4">
54
- <h1 class="display-4">
55
- {{ edition_title }}
56
- </h1>
56
+ <p class="display-4">
57
+ {{ edition_title | escape }}
58
+ </p>
57
59
  </div>
58
60
  {%- endunless -%}
59
61
 
@@ -18,7 +18,7 @@
18
18
  <meta name="twitter:description" content="{{ page_description | escape }}" />
19
19
 
20
20
  {%- comment -%} Open Graph tags {%- endcomment -%}
21
- <meta property="og:site_name" content="{{ edition_title }}" />
21
+ <meta property="og:site_name" content="{{ edition_title | escape }}" />
22
22
  {%- if edition_link_preview.img and edition_link_preview.img.open_graph %}
23
23
  {%- assign og_image_url = edition_link_preview.img.open_graph | prepend: '/assets/images/' | prepend: site.baseurl | prepend: site.url -%}
24
24
  <meta property="og:image" content="{{ og_image_url }}" />
@@ -16,7 +16,7 @@
16
16
  <meta name="mobile-web-app-capable" content="yes" />
17
17
  <meta name="apple-mobile-web-app-capable" content="yes" />
18
18
  <meta name="apple-mobile-web-app-status-bar-style" content="default" />
19
- <meta name="apple-mobile-web-app-title" content="{{ site.title }}" />
19
+ <meta name="apple-mobile-web-app-title" content="{{ site.title | escape }}" />
20
20
 
21
21
  {% include get_pwa_icon.html -%}
22
22
  {%- if pwa_icon_url -%}
@@ -2,7 +2,7 @@
2
2
  <nav class="navbar navbar-expand-{{ breakpoint }} d-pwa-none bg-body-tertiary mb-3" aria-label="{{ site.data.lang[site.conference.lang].navigation.main | default: 'Main navigation' }}">
3
3
  <div class="container">
4
4
 
5
- <a class="navbar-brand order-0" href="{{ site.baseurl }}{{ edition_base }}/">{{ edition_title }}</a>
5
+ <a class="navbar-brand order-0" href="{{ site.baseurl }}{{ edition_base }}/">{{ edition_title | escape }}</a>
6
6
 
7
7
  <button class="navbar-toggler order-1" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ site.data.lang[site.conference.lang].navigation.toggle | default: 'Toggle navigation menu' }}">
8
8
  <span class="navbar-toggler-icon" aria-hidden="true"></span>
@@ -17,7 +17,7 @@
17
17
  {%- unless menu_empty %}
18
18
  <li class="nav-item dropdown">
19
19
  <a class="nav-link dropdown-toggle" href="#" id="navbar-dropdown{{ forloop.index0 }}" role="button" data-bs-toggle="dropdown" aria-expanded="false"{% if menu_label %} aria-label="{{ menu_label }}"{% endif %}>
20
- {{ menu_name }}
20
+ {{ menu_name | escape }}
21
21
  </a>
22
22
  <div class="dropdown-menu">
23
23
  {%- include show_menu_items.html %}
@@ -34,7 +34,7 @@
34
34
  {%- include get_link.html class="nav-link" is_active=is_active -%}
35
35
  {{ link_tag }}
36
36
  {%- if link.name -%}
37
- {{ link.name }}
37
+ {{ link.name | escape }}
38
38
  {%- else -%}
39
39
  {% include get_live_icon.html %}
40
40
  {%- endif -%}
@@ -44,7 +44,7 @@
44
44
  {%- if link.name_inactive -%}
45
45
  <li class="nav-item live-hide d-print-inline-block" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
46
46
  <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">
47
- {{ link.name_inactive }}
47
+ {{ link.name_inactive | escape }}
48
48
  </a>
49
49
  </li>
50
50
  {%- endif -%}
@@ -56,7 +56,7 @@
56
56
  {%- include get_link_active.html -%}
57
57
  {%- include get_link.html class="nav-link" is_active=is_active -%}
58
58
  {{ link_tag }}
59
- {{ link.name }}
59
+ {{ link.name | escape }}
60
60
  </a>
61
61
  </li>
62
62
  {%- endif -%}
@@ -71,7 +71,7 @@
71
71
  <ul class="navbar-nav">
72
72
  <li class="nav-item dropdown">
73
73
  <a class="nav-link dropdown-toggle" href="#" id="navbar-editions" role="button" data-bs-toggle="dropdown" aria-expanded="false"{% if menu_label %} aria-label="{{ menu_label }}"{% endif %}>
74
- {{ menu_name }}
74
+ {{ menu_name | escape }}
75
75
  </a>
76
76
  <div class="dropdown-menu dropdown-menu-end">
77
77
  {%- include show_menu_items.html %}
@@ -92,14 +92,14 @@
92
92
  <div class="px-2"{{ pwa_tab_attr }}>
93
93
  <button type="button" class="nav-link icon-link d-flex flex-column flex-md-row align-items-center text-center" data-bs-toggle="offcanvas" data-bs-target="#{{ sheet_id }}" aria-controls="{{ sheet_id }}"{% if menu_label %} aria-label="{{ menu_label }}"{% endif %}>
94
94
  {% assign link_icon_name = link.icon | default: 'list' %}{% include icon.html name=link_icon_name %}
95
- <span>{{ menu_name }}</span>
95
+ <span>{{ menu_name | escape }}</span>
96
96
  </button>
97
97
  </div>
98
98
 
99
99
  {%- capture pwa_sheet %}
100
100
  <div class="offcanvas offcanvas-bottom h-auto rounded-top-4 d-print-none navbar-pwa-sheet" tabindex="-1" id="{{ sheet_id }}" aria-labelledby="{{ sheet_id }}-label">
101
101
  <div class="offcanvas-header">
102
- <h2 class="offcanvas-title h5" id="{{ sheet_id }}-label">{{ menu_name }}</h2>
102
+ <h2 class="offcanvas-title h5" id="{{ sheet_id }}-label">{{ menu_name | escape }}</h2>
103
103
  <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{ lang.close | default: 'Close' }}"></button>
104
104
  </div>
105
105
  <div class="offcanvas-body pt-0">
@@ -117,7 +117,7 @@
117
117
  {%- include get_link.html class="nav-link icon-link d-flex flex-column flex-md-row align-items-center text-center" is_active=is_active -%}
118
118
  {{ link_tag }}
119
119
  {% assign link_icon_name = link_icon | default: 'link-45deg' %}{% include icon.html name=link_icon_name fill=is_active %}
120
- <span>{{ link.name }}</span>
120
+ <span>{{ link.name | escape }}</span>
121
121
  </a>
122
122
  </div>
123
123
  {%- endif -%}
@@ -131,7 +131,7 @@
131
131
  {%- include get_link.html class="nav-link icon-link d-flex flex-column flex-md-row align-items-center text-center" is_active=is_active -%}
132
132
  {{ link_tag }}
133
133
  {% include get_live_icon.html icon_only=true %}
134
- <span>{{ link.name | default: lang.live.live | default: "Live" }}</span>
134
+ <span>{{ link.name | default: lang.live.live | default: "Live" | escape }}</span>
135
135
  </a>
136
136
  </div>
137
137
 
@@ -139,7 +139,7 @@
139
139
  <div class="px-2 live-hide" {{ pwa_live_range }}>
140
140
  <a class="nav-link icon-link d-flex flex-column flex-md-row align-items-center text-center disabled" href="#" tabindex="-1" aria-disabled="true">
141
141
  {% include get_live_icon.html icon_only=true %}
142
- <span>{{ link.name_inactive }}</span>
142
+ <span>{{ link.name_inactive | escape }}</span>
143
143
  </a>
144
144
  </div>
145
145
  {%- endif -%}
@@ -185,7 +185,7 @@
185
185
  {%- include get_link.html class="list-group-item list-group-item-action icon-link" is_active=is_active %}
186
186
  {{ link_tag | replace_first: "<a", pwa_link_open }}
187
187
  {% assign link_icon_name = link_icon | default: 'link-45deg' %}{% include icon.html name=link_icon_name %}
188
- {{ link.name }}
188
+ {{ link.name | escape }}
189
189
  </a>
190
190
  {%- endfor -%}
191
191
  {%- endcapture -%}
@@ -204,7 +204,7 @@
204
204
  {%- include get_pwa_in.html -%}
205
205
  {%- include get_menu.html %}
206
206
  <div{{ pwa_more_attr }}>
207
- <h3 class="h6 mt-3 mb-1 px-3 text-body-secondary">{{ menu_name }}</h3>
207
+ <h3 class="h6 mt-3 mb-1 px-3 text-body-secondary">{{ menu_name | escape }}</h3>
208
208
  <div class="list-group list-group-flush">
209
209
  {%- include show_menu_items.html item_class="list-group-item list-group-item-action" %}
210
210
  </div>
@@ -2,7 +2,7 @@
2
2
  Steps to install the app (PWA), opened by _includes/pwa_toasts.html.
3
3
  _js/modules/pwa.js shows the steps of the visitor's platform.
4
4
  {%- endcomment -%}
5
- {%- if site.conference.pwa.enable and site.conference.pwa.install_toast != false and edition_current -%}
5
+ {%- if site.conference.pwa.enable and site.conference.pwa.install_toast != false and edition_current and site.conference.pwa.icons -%}
6
6
  {%- assign lang = site.data.lang[site.conference.lang] %}
7
7
  <div class="offcanvas offcanvas-bottom h-auto rounded-top-4 d-print-none" tabindex="-1" id="pwa-install" aria-labelledby="pwa-install-label">
8
8
  <div class="offcanvas-header">
@@ -8,7 +8,8 @@
8
8
  {%- if site.conference.pwa.enable -%}
9
9
  {%- assign lang = site.data.lang[site.conference.lang] %}
10
10
  <div class="toast-container pwa-toasts d-print-none" role="status">
11
- {%- if site.conference.pwa.install_toast != false and edition_current -%}
11
+ {%- comment -%} Not without icons: browsers do not install the app then {%- endcomment -%}
12
+ {%- if site.conference.pwa.install_toast != false and edition_current and site.conference.pwa.icons -%}
12
13
  {%- include get_pwa_icon.html %}
13
14
  <div class="toast pwa-toast" id="pwa-install-toast">
14
15
  <div class="d-flex align-items-center gap-2 p-2">
@@ -13,7 +13,7 @@
13
13
  {% unless menu_empty %}
14
14
  <div class="dropdown d-inline">
15
15
  <a class="{{ btn_default }} dropdown-toggle" href="#" role="button" id="{{ include.id }}-dropdown{{ forloop.index0 }}" data-bs-toggle="dropdown"{% if include.popper %} data-bs-popper-config='{"strategy":"{{ include.popper }}"}'{% endif %} aria-expanded="false"{% if menu_label %} aria-label="{{ menu_label }}"{% endif %}>
16
- {{ menu_name }}
16
+ {{ menu_name | escape }}
17
17
  </a>
18
18
  <div class="dropdown-menu">
19
19
  {% include show_menu_items.html %}
@@ -29,7 +29,7 @@
29
29
  {%- include get_link.html class=btn_default -%}
30
30
  {{ link_tag }}
31
31
  {%- if link.name -%}
32
- {{ link.name }}
32
+ {{ link.name | escape }}
33
33
  {%- else -%}
34
34
  {% include get_live_icon.html %}
35
35
  {%- endif -%}
@@ -38,7 +38,7 @@
38
38
 
39
39
  {%- if link.name_inactive -%}
40
40
  <span class="live-hide d-print-inline {{ btn_default }} disabled" aria-disabled="true" data-start="{{ live_starts }}" data-end="{{ live_ends }}">
41
- {{ link.name_inactive }}
41
+ {{ link.name_inactive | escape }}
42
42
  </span>
43
43
  {%- endif -%}
44
44
 
@@ -47,7 +47,7 @@
47
47
  {% else %}
48
48
  {% include get_link.html class=btn_default %}
49
49
  {{ link_tag }}
50
- {{ link.name }}
50
+ {{ link.name | escape }}
51
51
  </a>
52
52
  {% endif %}
53
53
  {% endfor %}
@@ -15,7 +15,7 @@
15
15
  {%- for link in menu_links -%}
16
16
  {%- include get_link.html class=menu_item_class %}
17
17
  {{ link_tag }}
18
- {{ link.name }}
18
+ {{ link.name | escape }}
19
19
  </a>
20
20
  {%- endfor -%}
21
21
  {%- endif -%}
data/_layouts/home.html CHANGED
@@ -8,12 +8,12 @@
8
8
  {%- if page.header.img_dark %}
9
9
  <source srcset="{{ page.header.img_dark | prepend: '/assets/images/' | prepend: site.baseurl }}" media="(prefers-color-scheme: dark)" />
10
10
  {%- endif %}
11
- <img src="{{ page.header.img | prepend: '/assets/images/' | prepend: site.baseurl }}" class="home-header-img" alt="{{ edition_title }}" />
11
+ <img src="{{ page.header.img | prepend: '/assets/images/' | prepend: site.baseurl }}" class="home-header-img" alt="{{ edition_title | escape }}" />
12
12
  </picture>
13
13
  {% elsif page.title %}
14
- {{ page.title }}
14
+ {{ page.title | escape }}
15
15
  {% else %}
16
- {{ edition_title }}
16
+ {{ edition_title | escape }}
17
17
  {% endif %}
18
18
  </h1>
19
19
  {% if edition_description != none %}
@@ -66,6 +66,12 @@
66
66
  {%- endfor -%}
67
67
 
68
68
  {%- assign static_paths = site.static_files | map: "path" -%}
69
+
70
+ {%- comment -%}
71
+ Not media and archives below /assets/ (e.g. a video): too large to store on
72
+ every visitor's device, loaded from the network when opened
73
+ {%- endcomment -%}
74
+ {%- assign large_exts = ".mp4,.m4v,.webm,.mov,.avi,.mkv,.mp3,.m4a,.ogg,.oga,.wav,.flac,.pdf,.zip,.gz,.tgz,.7z,.rar,.psd,.ai" | split: "," -%}
69
75
  {%- for file in site.static_files -%}
70
76
  {%- assign ext = file.extname | downcase -%}
71
77
  {%- assign woff2_path = file.path | append: "2" -%}
@@ -75,7 +81,7 @@
75
81
  {%- if ext == ".woff" and static_paths contains woff2_path -%}
76
82
  {%- continue -%}
77
83
  {%- endif -%}
78
- {%- if ext == ".map" or skip_assets contains file.path or file.path contains "/assets/js/leaflet-" or file.path contains "/assets/webfonts/bootstrap-icons." -%}
84
+ {%- if ext == ".map" or large_exts contains ext or skip_assets contains file.path or file.path contains "/assets/js/leaflet-" or file.path contains "/assets/webfonts/bootstrap-icons." -%}
79
85
  {%- continue -%}
80
86
  {%- endif -%}
81
87
  {%- assign url = file.path | prepend: site.baseurl -%}
data/_layouts/live.html CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  <h1 class="display-5 mb-4 text-break">
5
5
  {% if page.title %}
6
- {{ page.title }}
6
+ {{ page.title | escape }}
7
7
  {% else %}
8
8
  {{ live_lang.stream | default: "Live stream" }}
9
9
  {% endif %}
@@ -7,7 +7,7 @@
7
7
 
8
8
  <h1 class="display-5 mb-3 text-break">
9
9
  {% if page.title %}
10
- {{ page.title }}
10
+ {{ page.title | escape }}
11
11
  {% else %}
12
12
  {{ site.data.lang[site.conference.lang].location.name | default: "Location" }}
13
13
  {% endif %}
@@ -37,14 +37,32 @@
37
37
  "shortcuts": [
38
38
  {%- assign first_shortcut = true -%}
39
39
  {%- for link in edition_nav_links -%}
40
- {%- unless link.pwa_hide or link.live or link.menu -%}
40
+ {%- unless link.pwa_hide or link.live or link.menu or link.video -%}
41
41
  {%- include get_link.html %}
42
+ {%- comment -%}
43
+ Only pages of the site: a shortcut needs a URL within the app's scope
44
+ (not another site's, e.g. tickets, nor a link without URL)
45
+ {%- endcomment -%}
46
+ {%- assign link_first = link_href | slice: 0, 1 -%}
47
+ {%- assign link_start = link_href | slice: 0, 2 -%}
48
+ {%- assign site_prefix = site.url | append: site.baseurl | append: "/" -%}
49
+ {%- assign link_own = false -%}
50
+ {%- if link_first == "/" and link_start != "//" -%}
51
+ {%- assign link_own = true -%}
52
+ {%- elsif site.url and link_href and link_href contains site_prefix -%}
53
+ {%- assign link_prefix = link_href | slice: 0, site_prefix.size -%}
54
+ {%- if link_prefix == site_prefix -%}
55
+ {%- assign link_own = true -%}
56
+ {%- endif -%}
57
+ {%- endif -%}
58
+ {%- if link_own -%}
42
59
  {%- unless first_shortcut -%},{%- endunless -%}
43
60
  {%- assign first_shortcut = false %}
44
61
  {
45
62
  "name": {{ link.name | jsonify }},
46
63
  "url": {{ link_href | jsonify }}
47
64
  }
65
+ {%- endif -%}
48
66
  {%- endunless -%}
49
67
  {%- endfor %}
50
68
  ]
@@ -6,10 +6,11 @@
6
6
  {%- endcomment -%}
7
7
  {%- assign not_found_lang = site.data.lang[site.conference.lang].not_found %}
8
8
 
9
- <h1 class="display-5 mb-3 text-break">
10
- {{ page.title | default: not_found_lang.title | default: "Page not found" }}
9
+ <h1 class="display-5 mb-3 text-break" id="not-found-title">
10
+ {{ page.title | default: not_found_lang.title | default: "Page not found" | escape }}
11
11
  </h1>
12
12
 
13
+ <div id="not-found-text">
13
14
  {%- comment -%} An empty Markdown page still holds a line break {%- endcomment -%}
14
15
  {%- assign not_found_content = content | strip %}
15
16
  {% if not_found_content != "" -%}
@@ -17,6 +18,15 @@
17
18
  {%- else -%}
18
19
  <p class="lead">{{ not_found_lang.text | default: "This page does not exist (anymore)." }}</p>
19
20
  {%- endif %}
21
+ </div>
22
+
23
+ {%- comment -%}
24
+ Shown offline by the service worker for pages not stored (data-offline,
25
+ _layouts/sw.js): the page may well exist, it is only not on the device
26
+ {%- endcomment -%}
27
+ {%- assign offline_title = not_found_lang.offline_title | default: "Not available offline" -%}
28
+ {%- assign offline_text = not_found_lang.offline_text | default: "This page has not been stored on this device. Open it again once you are online." %}
29
+ <script>{ if (document.documentElement.hasAttribute("data-offline")) { const title = {{ offline_title | jsonify | replace: "<", "\u003c" }}; const text = document.createElement("p"); text.className = "lead"; text.textContent = {{ offline_text | jsonify | replace: "<", "\u003c" }}; document.getElementById("not-found-title").textContent = title; document.getElementById("not-found-text").replaceChildren(text); document.title = `${title} - ${ {{ edition_title | jsonify | replace: "<", "\u003c" }} }`; } }</script>
20
30
 
21
31
  <a class="btn btn-primary" href="{{ site.baseurl }}{{ edition_base }}/">{{ not_found_lang.home | default: "Go to the home page" }}</a>
22
32
 
data/_layouts/page.html CHANGED
@@ -1,7 +1,7 @@
1
1
  {% include header.html %}
2
2
 
3
3
  {% if page.title -%}
4
- <h1 class="display-5 mb-3 text-break">{{ page.title }}</h1>
4
+ <h1 class="display-5 mb-3 text-break">{{ page.title | escape }}</h1>
5
5
  {%- endif %}
6
6
 
7
7
  {{ content }}
@@ -2,7 +2,7 @@
2
2
 
3
3
  <h1 class="display-5 mb-4 text-break">
4
4
  {% if page.title %}
5
- {{ page.title }}
5
+ {{ page.title | escape }}
6
6
  {% else %}
7
7
  {{ site.data.lang[site.conference.lang].speaker.overview | default: "Speakers" }}
8
8
  {% endif %}