jekyll-theme-conference 5.3.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 +4 -4
- data/README.md +96 -49
- data/UPGRADE_GUIDE.md +16 -1
- data/_data/conference_assets.yml +3 -3
- data/_data/lang.yml +71 -39
- data/_includes/checks.html +9 -1
- data/_includes/conference_config.json +15 -10
- data/_includes/embed_consent.html +1 -1
- data/_includes/footer.html +2 -1
- data/_includes/get_edition.html +15 -0
- data/_includes/get_link.html +1 -1
- data/_includes/get_link_active.html +3 -1
- data/_includes/get_link_tag_streaming.html +24 -6
- data/_includes/get_live_timestamps.html +19 -6
- data/_includes/get_menu.html +2 -2
- data/_includes/get_page_title.html +2 -2
- data/_includes/get_pwa_icon.html +10 -0
- data/_includes/get_talk_timestamp.html +11 -6
- data/_includes/header.html +10 -9
- data/_includes/infobox.html +6 -6
- data/_includes/list_header_meta.html +1 -1
- data/_includes/list_header_pwa.html +11 -12
- data/_includes/modal_link.html +4 -3
- data/_includes/modal_live.html +5 -52
- data/_includes/navbar.html +10 -9
- data/_includes/navbar_pwa.html +9 -8
- data/_includes/pwa_install.html +4 -4
- data/_includes/pwa_toasts.html +40 -0
- data/_includes/show_link_buttons.html +5 -5
- data/_includes/show_menu_items.html +1 -1
- data/_includes/show_stream.html +63 -0
- data/_layouts/home.html +3 -3
- data/_layouts/htaccess.html +20 -7
- data/_layouts/json-site.html +22 -2
- data/_layouts/live.html +26 -0
- data/_layouts/location.html +2 -2
- data/_layouts/manifest.html +31 -11
- data/_layouts/not-found.html +33 -0
- data/_layouts/page.html +1 -1
- data/_layouts/program.html +1 -1
- data/_layouts/speaker-overview.html +1 -1
- data/_layouts/speaker.html +1 -1
- data/_layouts/sw.js +200 -52
- data/_sass/bootstrap.scss +1 -0
- data/_sass/theme.scss +183 -124
- data/assets/css/conference-only.bundle.css +1 -1
- data/assets/css/conference.bundle.css +1 -1
- data/assets/js/conference.bundle.js +2 -2
- metadata +6 -3
- data/_includes/pwa_banner.html +0 -29
- data/_layouts/stream-overview.html +0 -45
data/_layouts/sw.js
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
|
+
{%- include get_edition.html -%}
|
|
1
2
|
const BASE_URL = "{{ site.baseurl }}";
|
|
2
3
|
const VERSION = "{{ site.time | date: '%Y%m%d%H%M%S' }}";
|
|
3
4
|
const CACHE_PREFIX = "jekyll-conference-theme-";
|
|
4
5
|
const CACHE_NAME = `${CACHE_PREFIX}${VERSION}`;
|
|
5
6
|
|
|
6
|
-
// Fall back to the cached page when the network is this slow, e.g. on a
|
|
7
|
-
// crowded conference Wi-Fi (the response still updates the cache)
|
|
8
|
-
const NETWORK_TIMEOUT_MS = 3000;
|
|
9
7
|
const HTTP_NOT_MODIFIED = 304;
|
|
8
|
+
const HTTP_NOT_FOUND = 404;
|
|
9
|
+
|
|
10
|
+
// Message to the pages once a build changed the site (_js/modules/pwa.js)
|
|
11
|
+
const SITE_UPDATED = "site-updated";
|
|
12
|
+
|
|
13
|
+
// Pages of each build link the site's files with its build time (e.g.
|
|
14
|
+
// main.css?t=1793258390): ignored, so a rebuild alone is no update
|
|
15
|
+
const BUILD_TIME = /\?t=\d+/g;
|
|
16
|
+
|
|
17
|
+
// Whether this build changed the site: noted in its cache on install (the
|
|
18
|
+
// browser may stop the worker before activation, losing variables), told the
|
|
19
|
+
// pages on activation
|
|
20
|
+
const SITE_UPDATED_KEY = `${BASE_URL}/__site-updated__`;
|
|
21
|
+
|
|
22
|
+
// Whether the latest version differs from the stored one, ignoring the build time
|
|
23
|
+
const isChanged = async (stored, latest) => {
|
|
24
|
+
const [before, after] = await Promise.all([stored.text(), latest.text()]);
|
|
25
|
+
return before.replace(BUILD_TIME, "") !== after.replace(BUILD_TIME, "");
|
|
26
|
+
};
|
|
10
27
|
|
|
11
28
|
// Copy of the previous build (cache), or nothing on the first install
|
|
12
29
|
const previousCache = async () => {
|
|
@@ -16,11 +33,13 @@ const previousCache = async () => {
|
|
|
16
33
|
|
|
17
34
|
// Store a resource in the new cache, downloading only what changed since the
|
|
18
35
|
// previous build: theme bundles carry their content hash (e.g.
|
|
19
|
-
// conference.bundle.css?v=1a2b3c), all other resources are revalidated (304)
|
|
36
|
+
// conference.bundle.css?v=1a2b3c), all other resources are revalidated (304).
|
|
37
|
+
// Resolves whether it changed.
|
|
20
38
|
const precache = async (cache, previous, url) => {
|
|
21
39
|
const cached = previous && (await previous.match(url));
|
|
22
40
|
if (cached && new URL(url, self.location.href).searchParams.has("v")) {
|
|
23
|
-
|
|
41
|
+
await cache.put(url, cached);
|
|
42
|
+
return false;
|
|
24
43
|
}
|
|
25
44
|
|
|
26
45
|
const headers = {};
|
|
@@ -31,38 +50,55 @@ const precache = async (cache, previous, url) => {
|
|
|
31
50
|
headers["If-Modified-Since"] = cached.headers.get("Last-Modified");
|
|
32
51
|
}
|
|
33
52
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
// Low priority: the visitor's own requests go first. On failure (e.g. a
|
|
54
|
+
// flaky network) the previous copy stays, as the old cache is deleted.
|
|
55
|
+
let response;
|
|
56
|
+
try {
|
|
57
|
+
response = await fetch(url, { cache: "no-store", headers, priority: "low" });
|
|
58
|
+
if (response.status === HTTP_NOT_MODIFIED && cached) {
|
|
59
|
+
await cache.put(url, cached);
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
if (!response.ok) {
|
|
63
|
+
throw new Error(`${response.status} ${url}`);
|
|
64
|
+
}
|
|
65
|
+
await cache.put(url, response.clone());
|
|
66
|
+
} catch (error) {
|
|
67
|
+
if (cached) {
|
|
68
|
+
await cache.put(url, cached);
|
|
69
|
+
}
|
|
70
|
+
throw error;
|
|
40
71
|
}
|
|
41
|
-
|
|
72
|
+
|
|
73
|
+
// Example: main.css?t=1793258390 of the previous build. New resources
|
|
74
|
+
// change the pages linking them.
|
|
75
|
+
const stored = previous && (await previous.match(url, { ignoreSearch: true }));
|
|
76
|
+
return stored ? isChanged(stored, response) : false;
|
|
42
77
|
};
|
|
43
78
|
|
|
44
79
|
// Install event - precache all pages and assets listed in site.json
|
|
45
80
|
self.addEventListener("install", (event) => {
|
|
46
81
|
event.waitUntil(
|
|
47
82
|
(async () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
83
|
+
// Without the list (e.g. offline during the update) the install fails:
|
|
84
|
+
// the previous worker and its cache stay, the browser retries later
|
|
85
|
+
const response = await fetch(`${BASE_URL}/assets/js/site.json`, { cache: "no-store" });
|
|
86
|
+
if (!response.ok) {
|
|
87
|
+
throw new Error(`Failed to load site.json: ${response.status}`);
|
|
88
|
+
}
|
|
89
|
+
const { pages = [], assets = [] } = await response.json();
|
|
90
|
+
|
|
91
|
+
// Cache each resource on its own, so one missing file does not
|
|
92
|
+
// leave the whole cache empty
|
|
93
|
+
const cache = await caches.open(CACHE_NAME);
|
|
94
|
+
const previous = await previousCache();
|
|
95
|
+
const results = await Promise.allSettled([...pages, ...assets].map((url) => precache(cache, previous, url)));
|
|
96
|
+
const failed = results.filter((result) => result.status === "rejected");
|
|
97
|
+
if (failed.length) {
|
|
98
|
+
console.warn(`Service worker could not cache ${failed.length} resource(s)`);
|
|
99
|
+
}
|
|
100
|
+
if (results.some((result) => result.value === true)) {
|
|
101
|
+
await cache.put(SITE_UPDATED_KEY, new Response(""));
|
|
66
102
|
}
|
|
67
103
|
|
|
68
104
|
// Activate new versions right away (schedule updates)
|
|
@@ -75,6 +111,9 @@ self.addEventListener("install", (event) => {
|
|
|
75
111
|
self.addEventListener("activate", (event) => {
|
|
76
112
|
event.waitUntil(
|
|
77
113
|
(async () => {
|
|
114
|
+
// Request pages while the service worker boots (see fromNetwork)
|
|
115
|
+
await self.registration.navigationPreload?.enable();
|
|
116
|
+
|
|
78
117
|
const cacheNames = await caches.keys();
|
|
79
118
|
await Promise.all(
|
|
80
119
|
cacheNames
|
|
@@ -82,36 +121,129 @@ self.addEventListener("activate", (event) => {
|
|
|
82
121
|
.map((name) => caches.delete(name)),
|
|
83
122
|
);
|
|
84
123
|
await self.clients.claim();
|
|
124
|
+
|
|
125
|
+
// Once for all pages of the build, e.g. not again on the next page
|
|
126
|
+
const cache = await caches.open(CACHE_NAME);
|
|
127
|
+
if (await cache.delete(SITE_UPDATED_KEY)) {
|
|
128
|
+
const clients = await self.clients.matchAll({ type: "window" });
|
|
129
|
+
clients.forEach((client) => client.postMessage({ type: SITE_UPDATED }));
|
|
130
|
+
}
|
|
85
131
|
})(),
|
|
86
132
|
);
|
|
87
133
|
});
|
|
88
134
|
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
135
|
+
// Latest version from the network, e.g. the page's navigation preload
|
|
136
|
+
const fetchLatest = (event) =>
|
|
137
|
+
(event.preloadResponse ?? Promise.resolve()).then((preloaded) => preloaded || fetch(event.request));
|
|
138
|
+
|
|
139
|
+
// Pages and data are looked up ignoring the query (staleWhileRevalidate):
|
|
140
|
+
// stored without it, so variants (e.g. /live/?room=A) do not pile up
|
|
141
|
+
const storeKey = (request) => {
|
|
142
|
+
const url = new URL(request.url);
|
|
143
|
+
if (request.mode !== "navigate" && !url.pathname.endsWith(".json")) {
|
|
144
|
+
return request;
|
|
145
|
+
}
|
|
146
|
+
url.search = "";
|
|
147
|
+
return url.href;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// Store a complete response for later (not e.g. partial content, 206, which
|
|
151
|
+
// the cache refuses), copied before the page reads it; resolves once stored
|
|
152
|
+
const store = (request, response) => {
|
|
153
|
+
if (response.status !== 200 || response.headers.get("Vary") === "*") {
|
|
154
|
+
return Promise.resolve();
|
|
155
|
+
}
|
|
156
|
+
const copy = response.clone();
|
|
157
|
+
return caches
|
|
158
|
+
.open(CACHE_NAME)
|
|
159
|
+
.then((cache) => cache.put(storeKey(request), copy))
|
|
160
|
+
.catch(() => {});
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
// Latest version from the network, stored for later without delaying it
|
|
164
|
+
const fromNetwork = (event) => {
|
|
165
|
+
const network = fetchLatest(event);
|
|
166
|
+
event.waitUntil(network.then((response) => store(event.request, response)).catch(() => {}));
|
|
167
|
+
return network;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// Store the latest version of a page shown from the cache, unless it
|
|
171
|
+
// changed: the next build's service worker stores all its pages at once and
|
|
172
|
+
// tells the pages once (see install), instead of each page on its own
|
|
173
|
+
const revalidatePage = async (event, cached) => {
|
|
174
|
+
const response = await fetchLatest(event);
|
|
175
|
+
if (!response.ok) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (await isChanged(cached, response.clone())) {
|
|
180
|
+
await self.registration.update();
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
await store(event.request, response);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// Page for missing addresses (layout: not-found, e.g. /404.html), if any
|
|
187
|
+
{%- assign not_found_page = site.pages | where: "layout", "not-found" | where_exp: "p", "p.edition == nil" | first -%}
|
|
188
|
+
{%- assign not_found_url = nil -%}
|
|
189
|
+
{%- if not_found_page -%}
|
|
190
|
+
{%- assign not_found_url = not_found_page.url | prepend: site.baseurl -%}
|
|
191
|
+
{%- endif %}
|
|
192
|
+
const NOT_FOUND_URL = {{ not_found_url | jsonify }};
|
|
193
|
+
|
|
194
|
+
// The site's page not found in place of the server's (e.g. plain text), and
|
|
195
|
+
// offline for pages not stored: then marked (data-offline), so it says the
|
|
196
|
+
// page is not available offline instead of missing (_layouts/not-found.html)
|
|
197
|
+
const notFound = async (response) => {
|
|
198
|
+
const page = NOT_FOUND_URL && (await caches.match(NOT_FOUND_URL));
|
|
199
|
+
if (!page) {
|
|
200
|
+
return response ?? Response.error();
|
|
201
|
+
}
|
|
202
|
+
if (response) {
|
|
203
|
+
return new Response(page.body, { status: HTTP_NOT_FOUND, headers: page.headers });
|
|
204
|
+
}
|
|
205
|
+
const html = (await page.text()).replace("<html", "<html data-offline");
|
|
206
|
+
return new Response(html, { status: HTTP_NOT_FOUND, headers: page.headers });
|
|
207
|
+
};
|
|
102
208
|
|
|
103
|
-
|
|
209
|
+
// Page not stored (e.g. a missing one): the network, else the page not found
|
|
210
|
+
const pageFromNetwork = async (event) => {
|
|
211
|
+
let response;
|
|
104
212
|
try {
|
|
105
|
-
|
|
106
|
-
if (response) {
|
|
107
|
-
return response;
|
|
108
|
-
}
|
|
213
|
+
response = await fromNetwork(event);
|
|
109
214
|
} catch {
|
|
110
|
-
|
|
215
|
+
return notFound();
|
|
111
216
|
}
|
|
217
|
+
return response.status === HTTP_NOT_FOUND ? notFound(response) : response;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
// Stale while revalidate: the cached copy right away, also on a crowded
|
|
221
|
+
// conference Wi-Fi, updated in the background (ignoring the query, e.g.
|
|
222
|
+
// /program/?day=2); the network only without a copy
|
|
223
|
+
const staleWhileRevalidate = async (event) => {
|
|
224
|
+
const cached = await caches.match(event.request, { ignoreSearch: true });
|
|
225
|
+
const isPage = event.request.mode === "navigate";
|
|
226
|
+
if (!cached) {
|
|
227
|
+
return isPage ? pageFromNetwork(event) : fromNetwork(event);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (isPage) {
|
|
231
|
+
event.waitUntil(revalidatePage(event, cached.clone()).catch(() => {}));
|
|
232
|
+
} else {
|
|
233
|
+
fromNetwork(event);
|
|
234
|
+
}
|
|
235
|
+
return cached;
|
|
236
|
+
};
|
|
112
237
|
|
|
113
|
-
|
|
114
|
-
|
|
238
|
+
// Network first: assets not in the cache; when offline, the cached copy
|
|
239
|
+
// ignoring the version query (e.g. main.css?t=1793258390)
|
|
240
|
+
const networkFirst = async (event) => {
|
|
241
|
+
const network = fromNetwork(event);
|
|
242
|
+
try {
|
|
243
|
+
return await network;
|
|
244
|
+
} catch {
|
|
245
|
+
return (await caches.match(event.request, { ignoreSearch: true })) || network;
|
|
246
|
+
}
|
|
115
247
|
};
|
|
116
248
|
|
|
117
249
|
// Cache first: versioned assets do not change once cached
|
|
@@ -129,6 +261,10 @@ const cacheFirst = async (event) => (await caches.match(event.request)) || netwo
|
|
|
129
261
|
{%- endif %}
|
|
130
262
|
const DOCUMENT_PATHS = {{ document_paths | jsonify }};
|
|
131
263
|
|
|
264
|
+
// Start of the current edition, e.g. /2026/, to which the root forwards
|
|
265
|
+
// (without editions: the root itself)
|
|
266
|
+
const EDITION_URL = `${BASE_URL}{{ edition_base }}/`;
|
|
267
|
+
|
|
132
268
|
// Fetch event - only handle same-origin GET requests within the site,
|
|
133
269
|
// except the service worker itself and documents
|
|
134
270
|
self.addEventListener("fetch", (event) => {
|
|
@@ -138,13 +274,25 @@ self.addEventListener("fetch", (event) => {
|
|
|
138
274
|
if (request.method !== "GET" || url.origin !== self.location.origin || !url.pathname.startsWith(`${BASE_URL}/`)) {
|
|
139
275
|
return;
|
|
140
276
|
}
|
|
277
|
+
// Parts of a file (e.g. seeking in audio or video) stay the browser's: the
|
|
278
|
+
// cache holds whole files only
|
|
279
|
+
if (request.headers.has("Range")) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
141
282
|
if (url.pathname === `${BASE_URL}/sw.js` || DOCUMENT_PATHS.some((path) => url.pathname.startsWith(`${BASE_URL}${path}`))) {
|
|
142
283
|
return;
|
|
143
284
|
}
|
|
144
285
|
|
|
286
|
+
// Forward the root (e.g. the app's start) right away, also offline, instead
|
|
287
|
+
// of loading its forwarding page (_layouts/editions.html)
|
|
288
|
+
if (request.mode === "navigate" && url.pathname === `${BASE_URL}/` && url.pathname !== EDITION_URL) {
|
|
289
|
+
event.respondWith(Response.redirect(`${EDITION_URL}${url.search}`));
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
|
|
145
293
|
// Example: /program/ (navigation) and /assets/js/data.json change during the conference
|
|
146
294
|
if (request.mode === "navigate" || url.pathname.endsWith(".json")) {
|
|
147
|
-
event.respondWith(
|
|
295
|
+
event.respondWith(staleWhileRevalidate(event));
|
|
148
296
|
return;
|
|
149
297
|
}
|
|
150
298
|
|
data/_sass/bootstrap.scss
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
@import "bootstrap/scss/navbar";
|
|
41
41
|
@import "bootstrap/scss/offcanvas";
|
|
42
42
|
@import "bootstrap/scss/tables";
|
|
43
|
+
@import "bootstrap/scss/toasts";
|
|
43
44
|
@import "bootstrap/scss/transitions";
|
|
44
45
|
|
|
45
46
|
// Include utilities API last to generate classes based on the Sass map in `_utilities.scss`
|
data/_sass/theme.scss
CHANGED
|
@@ -236,6 +236,11 @@ h1.room-name,
|
|
|
236
236
|
margin-bottom: 0;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
// Code in alerts in the alert's colour: the code colour is unreadable on its background
|
|
240
|
+
.alert code {
|
|
241
|
+
color: inherit;
|
|
242
|
+
}
|
|
243
|
+
|
|
239
244
|
// Home header image: full width on small screens
|
|
240
245
|
.home-header-img {
|
|
241
246
|
width: 100%;
|
|
@@ -245,6 +250,142 @@ h1.room-name,
|
|
|
245
250
|
}
|
|
246
251
|
}
|
|
247
252
|
|
|
253
|
+
// Video and stream modals (_includes/modal_link.html, modal_live.html): on
|
|
254
|
+
// phones the whole screen, clear of the system's areas (e.g. the notch),
|
|
255
|
+
// the video in 16:9 below the title and the last footer (e.g. the rooms)
|
|
256
|
+
// at the bottom; on tablets wider than Bootstrap's 500 px
|
|
257
|
+
@include media-breakpoint-down(sm) {
|
|
258
|
+
.modal-fullscreen-sm-down {
|
|
259
|
+
.modal-content {
|
|
260
|
+
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.modal-body.ratio {
|
|
264
|
+
flex-grow: 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.modal-footer:last-of-type {
|
|
268
|
+
margin-top: auto;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Stream modal: the rooms between the title and the stream (see
|
|
273
|
+
// _includes/show_stream.html), the last footer a close button within reach
|
|
274
|
+
#stream-modal .stream-rooms {
|
|
275
|
+
border-top: 0;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@include media-breakpoint-up(sm) {
|
|
280
|
+
#stream-modal .stream-rooms {
|
|
281
|
+
order: 1;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@include media-breakpoint-only(md) {
|
|
286
|
+
.modal-lg {
|
|
287
|
+
--#{$prefix}modal-width: #{map-get($container-max-widths, md)};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Live stream (_includes/show_stream.html), in the modal: rooms spread
|
|
292
|
+
// across, the next talk's links centred
|
|
293
|
+
.stream-rooms {
|
|
294
|
+
justify-content: space-around;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.stream-info-links {
|
|
298
|
+
align-self: center;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Live page (_layouts/live.html), as the modal: on phones the rooms above
|
|
302
|
+
// the stream, on tablets at the bottom of the screen, also while the page
|
|
303
|
+
// scrolls; on large screens the rooms beside the stream:
|
|
304
|
+
//
|
|
305
|
+
// ┌──────────────────┬───────┐
|
|
306
|
+
// │ stream │ rooms │
|
|
307
|
+
// ├──────────────────┤ │
|
|
308
|
+
// │ next talk, links │ │
|
|
309
|
+
// └──────────────────┴───────┘
|
|
310
|
+
.stream-page {
|
|
311
|
+
display: grid;
|
|
312
|
+
grid-template: "rooms" "player" "info" / minmax(0, 1fr);
|
|
313
|
+
gap: $spacer;
|
|
314
|
+
|
|
315
|
+
.stream-player {
|
|
316
|
+
grid-area: player;
|
|
317
|
+
overflow: hidden;
|
|
318
|
+
background-color: var(--#{$prefix}tertiary-bg);
|
|
319
|
+
@include border-radius();
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.stream-info {
|
|
323
|
+
grid-area: info;
|
|
324
|
+
display: flex;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.stream-info-links {
|
|
328
|
+
align-self: flex-start;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.stream-rooms {
|
|
332
|
+
grid-area: rooms;
|
|
333
|
+
display: flex;
|
|
334
|
+
flex-wrap: wrap;
|
|
335
|
+
justify-content: center;
|
|
336
|
+
gap: $spacer * 0.5;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Across the container, clear of the home indicator unless the app's tab
|
|
340
|
+
// bar below does so
|
|
341
|
+
@include media-breakpoint-between(sm, lg) {
|
|
342
|
+
grid-template: "player" auto "info" auto "rooms" 1fr / minmax(0, 1fr);
|
|
343
|
+
flex-grow: 1;
|
|
344
|
+
|
|
345
|
+
.stream-rooms {
|
|
346
|
+
position: sticky;
|
|
347
|
+
bottom: 0;
|
|
348
|
+
align-self: end;
|
|
349
|
+
margin: 0 calc(var(--#{$prefix}gutter-x) * -0.5);
|
|
350
|
+
padding: ($spacer * 0.5) calc(var(--#{$prefix}gutter-x) * 0.5) calc(#{$spacer * 0.5} + env(safe-area-inset-bottom));
|
|
351
|
+
background-color: var(--#{$prefix}body-bg);
|
|
352
|
+
border-top: var(--#{$prefix}border-width) solid var(--#{$prefix}border-color);
|
|
353
|
+
|
|
354
|
+
[data-pwa="true"] & {
|
|
355
|
+
padding-bottom: $spacer * 0.5;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@include media-breakpoint-up(lg) {
|
|
361
|
+
grid-template: "player rooms" auto "info ." auto / 2fr 1fr;
|
|
362
|
+
align-items: start;
|
|
363
|
+
|
|
364
|
+
.stream-rooms {
|
|
365
|
+
flex-direction: column;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// On tablets, the page scrolls within <main>, which fills the screen above
|
|
371
|
+
// the footer: the rooms then stay above the app's tab bar
|
|
372
|
+
@include media-breakpoint-between(sm, lg) {
|
|
373
|
+
body:has(.stream-page) {
|
|
374
|
+
display: flex;
|
|
375
|
+
flex-direction: column;
|
|
376
|
+
height: 100dvh;
|
|
377
|
+
|
|
378
|
+
main {
|
|
379
|
+
display: flex;
|
|
380
|
+
flex: 1 1 0;
|
|
381
|
+
flex-direction: column;
|
|
382
|
+
min-height: 0;
|
|
383
|
+
margin-bottom: 0 !important; // over .my-3
|
|
384
|
+
overflow-y: auto;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
248
389
|
// Dark mode
|
|
249
390
|
.mode-light {
|
|
250
391
|
display: initial;
|
|
@@ -262,9 +403,19 @@ h1.room-name,
|
|
|
262
403
|
display: initial;
|
|
263
404
|
}
|
|
264
405
|
|
|
265
|
-
// PWA: in the installed app,
|
|
266
|
-
//
|
|
267
|
-
|
|
406
|
+
// PWA: in the installed app (data-pwa, set by header.html before the first
|
|
407
|
+
// paint), the bottom navigation replaces the top one. It sticks to the
|
|
408
|
+
// bottom (part of the page, so it never covers the content). Not by
|
|
409
|
+
// display-mode: a site without the app opened standalone keeps its top one.
|
|
410
|
+
.d-pwa-block {
|
|
411
|
+
display: none;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
[data-pwa="true"] {
|
|
415
|
+
// No bounce beyond the page's ends (iOS) or stretch (Android): it would
|
|
416
|
+
// move the sticky tab bar along
|
|
417
|
+
overscroll-behavior-y: none;
|
|
418
|
+
|
|
268
419
|
.d-pwa-none {
|
|
269
420
|
display: none;
|
|
270
421
|
}
|
|
@@ -285,6 +436,11 @@ h1.room-name,
|
|
|
285
436
|
margin-top: auto;
|
|
286
437
|
}
|
|
287
438
|
|
|
439
|
+
.footer-pwa .pwa-toasts {
|
|
440
|
+
position: absolute;
|
|
441
|
+
bottom: 100%;
|
|
442
|
+
}
|
|
443
|
+
|
|
288
444
|
// Clear the system's areas (viewport-fit=cover), e.g. the home indicator
|
|
289
445
|
// below and the notch beside in landscape; 0 where there are none. The
|
|
290
446
|
// bar stays in place while pages change (see @view-transition below)
|
|
@@ -296,31 +452,6 @@ h1.room-name,
|
|
|
296
452
|
}
|
|
297
453
|
}
|
|
298
454
|
|
|
299
|
-
.d-pwa-block {
|
|
300
|
-
display: none;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
@media (display-mode: standalone), (display-mode: fullscreen) {
|
|
304
|
-
@include pwa-mode;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
[data-pwa="true"] {
|
|
308
|
-
@include pwa-mode;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// No bounce beyond the page's ends (iOS) or stretch (Android) in the app:
|
|
312
|
-
// it would move the sticky tab bar along. On the root, outside the mixin,
|
|
313
|
-
// as data-pwa is set on it
|
|
314
|
-
@media (display-mode: standalone), (display-mode: fullscreen) {
|
|
315
|
-
:root {
|
|
316
|
-
overscroll-behavior-y: none;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
[data-pwa="true"] {
|
|
321
|
-
overscroll-behavior-y: none;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
455
|
// Pages of the app cross-fade like native screens instead of flashing
|
|
325
456
|
@media (display-mode: standalone) and (prefers-reduced-motion: no-preference) {
|
|
326
457
|
@view-transition {
|
|
@@ -368,102 +499,30 @@ $pwa-live: ".navbar-pwa-live:not(.d-none)";
|
|
|
368
499
|
padding: 0 0 calc(var(--#{$prefix}offcanvas-padding-y) + env(safe-area-inset-bottom));
|
|
369
500
|
}
|
|
370
501
|
|
|
371
|
-
//
|
|
372
|
-
//
|
|
373
|
-
//
|
|
374
|
-
.pwa-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
--pwa-banner-muted: #98989f;
|
|
396
|
-
--pwa-banner-border: #38383a;
|
|
397
|
-
--pwa-banner-button-bg: #2c2c2e;
|
|
398
|
-
--pwa-banner-button-color: #409cff;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
&[data-platform="android"] {
|
|
402
|
-
--pwa-banner-bg: #fff;
|
|
403
|
-
--pwa-banner-color: #1f1f1f;
|
|
404
|
-
--pwa-banner-muted: #444746;
|
|
405
|
-
--pwa-banner-border: transparent;
|
|
406
|
-
--pwa-banner-button-bg: #0b57d0;
|
|
407
|
-
--pwa-banner-button-color: #fff;
|
|
408
|
-
|
|
409
|
-
font-family: Roboto, "Noto Sans", system-ui, sans-serif;
|
|
410
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
[data-bs-theme="dark"] &[data-platform="android"] {
|
|
414
|
-
--pwa-banner-bg: #1e1f20;
|
|
415
|
-
--pwa-banner-color: #e3e3e3;
|
|
416
|
-
--pwa-banner-muted: #c4c7c5;
|
|
417
|
-
--pwa-banner-button-bg: #a8c7fa;
|
|
418
|
-
--pwa-banner-button-color: #062e6f;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.pwa-banner-close {
|
|
423
|
-
flex-shrink: 0;
|
|
424
|
-
padding: 0.5rem;
|
|
425
|
-
border: 0;
|
|
426
|
-
background: none;
|
|
427
|
-
color: var(--pwa-banner-muted);
|
|
428
|
-
line-height: 1;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.pwa-banner-icon {
|
|
432
|
-
flex-shrink: 0;
|
|
433
|
-
width: 3rem;
|
|
434
|
-
height: 3rem;
|
|
435
|
-
border-radius: 0.75rem;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.pwa-banner-text {
|
|
439
|
-
display: flex;
|
|
440
|
-
flex-direction: column;
|
|
441
|
-
flex-grow: 1;
|
|
442
|
-
min-width: 0;
|
|
443
|
-
|
|
444
|
-
strong {
|
|
445
|
-
font-size: 0.9375rem;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
span {
|
|
449
|
-
color: var(--pwa-banner-muted);
|
|
450
|
-
font-size: 0.8125rem;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.pwa-banner-install {
|
|
455
|
-
flex-shrink: 0;
|
|
456
|
-
padding: 0.375rem 1rem;
|
|
457
|
-
border: 0;
|
|
458
|
-
border-radius: 1rem;
|
|
459
|
-
background: var(--pwa-banner-button-bg);
|
|
460
|
-
color: var(--pwa-banner-button-color);
|
|
461
|
-
font-weight: 600;
|
|
462
|
-
|
|
463
|
-
[data-platform="android"] & {
|
|
464
|
-
padding: 0.5rem 1.25rem;
|
|
465
|
-
border-radius: 1.25rem;
|
|
466
|
-
font-weight: 500;
|
|
502
|
+
// Toasts of the app (_includes/pwa_toasts.html): at the bottom, across the
|
|
503
|
+
// width of phones. The home indicator's area takes the place of the
|
|
504
|
+
// spacing instead of adding to it (e.g. iOS Safari: 34 px, not 34 + 16)
|
|
505
|
+
.pwa-toasts {
|
|
506
|
+
position: fixed;
|
|
507
|
+
right: 0;
|
|
508
|
+
bottom: max(0px, env(safe-area-inset-bottom) - #{$spacer});
|
|
509
|
+
z-index: $zindex-toast;
|
|
510
|
+
padding: $spacer;
|
|
511
|
+
|
|
512
|
+
// Opaque, so the page does not show through; one at a time, so without
|
|
513
|
+
// Bootstrap's spacing between toasts
|
|
514
|
+
.toast {
|
|
515
|
+
--#{$prefix}toast-bg: var(--#{$prefix}body-bg);
|
|
516
|
+
margin-bottom: 0;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@include media-breakpoint-down(sm) {
|
|
520
|
+
left: 0;
|
|
521
|
+
width: auto;
|
|
522
|
+
|
|
523
|
+
.toast {
|
|
524
|
+
width: 100%;
|
|
525
|
+
}
|
|
467
526
|
}
|
|
468
527
|
}
|
|
469
528
|
|