summaryrefslogtreecommitdiffstats
path: root/public/js/album.js
diff options
context:
space:
mode:
authorKen D'Ambrosio <ken@jots.org>2026-05-12 12:33:17 +0000
committerKen D'Ambrosio <ken@jots.org>2026-05-12 12:33:17 +0000
commitca717d9625cdd60272226db50f0f148c949565c7 (patch)
tree2479d3770390490a3cae04ade1891f44a57e4408 /public/js/album.js
parent3e1a71be6e63696dfe9792f123f24ece1da8116a (diff)
Move slideshow interval control to album page; fix mobile viewport clipping
- Interval input (default 5 s) now lives beside Shuffle/Full screen on the album page; passed as ?interval= param to the slideshow and seeded into the hidden ss-interval input on load. - Added "Interval" label text next to the input. - Fixed slideshow controls being pushed off-screen on mobile by using 100dvh (dynamic viewport height) with 100vh as a fallback, so the layout accounts for mobile browser chrome. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'public/js/album.js')
-rw-r--r--public/js/album.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/public/js/album.js b/public/js/album.js
index a2301c9..c3f775f 100644
--- a/public/js/album.js
+++ b/public/js/album.js
@@ -129,6 +129,8 @@ window.addEventListener('DOMContentLoaded', () => {
const p = [];
if (document.getElementById('ss-opt-shuffle')?.checked) p.push('shuffle=1');
if (document.getElementById('ss-opt-fullscreen')?.checked) p.push('fullscreen=1');
+ const iv = parseFloat(document.getElementById('ss-opt-interval')?.value);
+ if (iv && iv !== 5) p.push('interval=' + iv);
if (input && input.value.trim()) {
const visible = [...document.querySelectorAll('#album-grid .album-card')]
.filter(c => c.style.display !== 'none')
@@ -153,6 +155,7 @@ window.addEventListener('DOMContentLoaded', () => {
['ss-opt-shuffle', 'ss-opt-fullscreen'].forEach(id =>
document.getElementById(id)?.addEventListener('change', updateSsLink)
);
+ document.getElementById('ss-opt-interval')?.addEventListener('input', updateSsLink);
})();
// Touch swipe