better visual feedback for main view scroller
This commit is contained in:
parent
e3d701ee34
commit
4b3ce9902e
|
@ -68,7 +68,8 @@
|
|||
if((window.innerHeight + window.scrollY) >= document.body.offsetHeight && e.deltaY > 0) { // down
|
||||
if(elem = document.querySelector(".pagination > .next:not(.disabled)")) {
|
||||
if(tts < scroll_treshold) {
|
||||
document.querySelector("div#footbar").style.backgroundColor = "var(--scroller-bg)";
|
||||
document.querySelector("div#footbar").style.boxShadow = "inset 0px 4px 0px var(--accent)";
|
||||
document.querySelector("div#footbar").style.color = "var(--accent)";
|
||||
tts++;
|
||||
}
|
||||
else
|
||||
|
@ -78,7 +79,8 @@
|
|||
else if(window.scrollY <= 0 && e.deltaY < 0) { // up
|
||||
if(elem = document.querySelector(".pagination > .prev:not(.disabled)")) {
|
||||
if(tts < scroll_treshold) {
|
||||
document.querySelector("nav.navbar").style.backgroundColor = "var(--scroller-bg)";
|
||||
document.querySelector("nav.navbar").style.boxShadow = "0px 2px 0px var(--accent)";
|
||||
document.querySelector("nav.navbar").style.transition = ".5s ease-in-out";
|
||||
tts++;
|
||||
}
|
||||
else
|
||||
|
@ -87,8 +89,9 @@
|
|||
}
|
||||
else {
|
||||
tts = 0;
|
||||
document.querySelector("div#footbar").style.backgroundColor = "var(--nav-bg)";
|
||||
document.querySelector("nav.navbar").style.backgroundColor = "var(--nav-bg)";
|
||||
document.querySelector("div#footbar").style.boxShadow = "unset";
|
||||
document.querySelector("div#footbar").style.color = "transparent";
|
||||
document.querySelector("nav.navbar").style.boxShadow = "unset";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user