Implement kiosk mode functionality and update external link handling in footer and credits

This commit is contained in:
2025-04-21 21:01:43 +02:00
parent 5cfd8b2319
commit c89eb37361
5 changed files with 19 additions and 3 deletions

13
static/js/kiosk_mode.js Normal file
View File

@ -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);
});

View File

@ -79,7 +79,7 @@ function handleImage() {
}, 1000);
// Set the credits
credits.innerHTML = `Photo by <a href="${data.user.links.html}" target="_blank">${data.user.name}</a>`;
credits.innerHTML = `Photo by <a href="${data.user.links.html}" class="external-link" target="_blank">${data.user.name}</a>`;
credits.style.zIndex = 300000;
}
})

View File

@ -23,4 +23,5 @@ hidden {
footer {
margin-top: auto;
padding: 1rem !important;
}