feat: add Nimbus UI mode with adaptive scrollbars and layout improvements
This commit is contained in:
+21
@@ -25,5 +25,26 @@
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
<script>
|
||||
(function () {
|
||||
const body = document.body;
|
||||
let timer = null;
|
||||
const IDLE_DELAY = 900;
|
||||
const setIdle = () => {
|
||||
body.classList.remove('scrollbar-moving');
|
||||
body.classList.add('scrollbar-idle');
|
||||
};
|
||||
const setMoving = () => {
|
||||
body.classList.add('scrollbar-moving');
|
||||
body.classList.remove('scrollbar-idle');
|
||||
if (timer) clearTimeout(timer);
|
||||
timer = setTimeout(setIdle, IDLE_DELAY);
|
||||
};
|
||||
setIdle();
|
||||
window.addEventListener('mousemove', setMoving, { passive: true });
|
||||
window.addEventListener('wheel', setMoving, { passive: true });
|
||||
window.addEventListener('touchmove', setMoving, { passive: true });
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user