From c89eb3736192687b2cde29ef085584d795e4a83a Mon Sep 17 00:00:00 2001 From: Spacelord Date: Mon, 21 Apr 2025 21:01:43 +0200 Subject: [PATCH] Implement kiosk mode functionality and update external link handling in footer and credits --- static/js/kiosk_mode.js | 13 +++++++++++++ static/js/lockscreenBgHandler.js | 2 +- static/main.css | 1 + views/partials/footer.eta | 5 +++-- views/screensaver.eta | 1 + 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 static/js/kiosk_mode.js diff --git a/static/js/kiosk_mode.js b/static/js/kiosk_mode.js new file mode 100644 index 0000000..f4c7c27 --- /dev/null +++ b/static/js/kiosk_mode.js @@ -0,0 +1,13 @@ +document.addEventListener('DOMContentLoaded', () => { + setTimeout(() => { + // TODO: How to start kiosk mode? + if (true) { + console.info('Kiosk mode -> Disabled all external links'); + document.querySelectorAll('a').forEach((link) => { + if (link.classList.contains('external-link')) { + link.style.pointerEvents = 'none'; + } + }); + } + }, 1000); +}); diff --git a/static/js/lockscreenBgHandler.js b/static/js/lockscreenBgHandler.js index 7cc6e2d..438cc09 100644 --- a/static/js/lockscreenBgHandler.js +++ b/static/js/lockscreenBgHandler.js @@ -79,7 +79,7 @@ function handleImage() { }, 1000); // Set the credits - credits.innerHTML = `Photo by ${data.user.name}`; + credits.innerHTML = `Photo by ${data.user.name}`; credits.style.zIndex = 300000; } }) diff --git a/static/main.css b/static/main.css index cf0c338..343c0a0 100644 --- a/static/main.css +++ b/static/main.css @@ -23,4 +23,5 @@ hidden { footer { margin-top: auto; + padding: 1rem !important; } diff --git a/views/partials/footer.eta b/views/partials/footer.eta index ad54c7e..6297b15 100644 --- a/views/partials/footer.eta +++ b/views/partials/footer.eta @@ -2,10 +2,11 @@

- HydrationHUB by [Project-name-here].
+ HydrationHUB by [Project-name-here].
Running Version Load.

- \ No newline at end of file + + diff --git a/views/screensaver.eta b/views/screensaver.eta index 9a69927..7ff6315 100644 --- a/views/screensaver.eta +++ b/views/screensaver.eta @@ -13,5 +13,6 @@ + <%~ include("partials/base_foot.eta") %>