Implement kiosk mode functionality and update external link handling in footer and credits
This commit is contained in:
parent
5cfd8b2319
commit
c89eb37361
13
static/js/kiosk_mode.js
Normal file
13
static/js/kiosk_mode.js
Normal 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);
|
||||
});
|
@ -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;
|
||||
}
|
||||
})
|
||||
|
@ -23,4 +23,5 @@ hidden {
|
||||
|
||||
footer {
|
||||
margin-top: auto;
|
||||
padding: 1rem !important;
|
||||
}
|
||||
|
@ -2,10 +2,11 @@
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<i class="bi bi-cup-straw"></i>
|
||||
<strong>HydrationHUB</strong> by <a target="_blank" rel="noopener noreferrer" href="https://pnh.fyi">[Project-name-here]</a>.<br>
|
||||
<strong>HydrationHUB</strong> by <a target="_blank" rel="noopener noreferrer" href="https://pnh.fyi" class="external-link">[Project-name-here]</a>.<br>
|
||||
Running Version <span data-dataSource="version" data-dataAction="SPECIAL" class="is-skeleton">Load.</span>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="/static/apiWrapper.js"></script>
|
||||
<script src="/static/pageDriver.js"></script>
|
||||
<script src="/static/js/kiosk_mode.js"></script>
|
||||
|
@ -13,5 +13,6 @@
|
||||
<script src="/static/apiWrapper.js"></script>
|
||||
<script src="/static/pageDriver.js"></script>
|
||||
<script src="/static/js/lockscreenBgHandler.js"></script>
|
||||
<script src="/static/js/kiosk_mode.js"></script>
|
||||
|
||||
<%~ include("partials/base_foot.eta") %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user