Update web/templates/base.html
This commit is contained in:
parent
0ad24f1a75
commit
5ed23a1988
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user