This commit is contained in:
Michał Gdula 2023-06-19 19:08:23 +00:00
parent 43665fb930
commit 384aa2b152
173 changed files with 10 additions and 30637 deletions

11
static/js/scroll.js Normal file
View file

@ -0,0 +1,11 @@
const scroll = document.querySelector('.scroll');
function setScroll() {
let scrollPercentage = (window.scrollY / (document.body.scrollHeight - window.innerHeight)) * 100;
scroll.style.width = scrollPercentage + '%';
}
if (scroll) {
setScroll();
window.onscroll = () => { setScroll(); };
}