Update web/templates/base.html

This commit is contained in:
Joshua Laymon 2025-08-24 02:32:06 +00:00
parent 0ad24f1a75
commit 5ed23a1988

View File

@ -255,7 +255,21 @@
}
})();
</script>
<script>
// Sticky header: add shadow when page is scrolled
(function () {
const bar = document.querySelector('.topbar-wrap');
if (!bar) return;
const onScroll = () => {
const y = window.scrollY || document.documentElement.scrollTop || 0;
bar.classList.toggle('is-scrolled', y > 2);
};
document.addEventListener('scroll', onScroll, { passive: true });
onScroll(); // initialize
})();
</script>
<!-- === PWA service worker registration (BEGIN) === -->
<script>
if ('serviceWorker' in navigator) {