CHANGE scroll indicators to be interactive

This commit is contained in:
Hoernschen 2024-06-20 12:36:59 +02:00
parent 559cf1ef80
commit aee652e045
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
4 changed files with 45 additions and 24 deletions

View file

@ -0,0 +1,11 @@
function scrollDown() {
var scroller = document.getElementById("scroller");
var height = scroller.offsetHeight;
scroller.scrollBy(0, height);
}
function scrollUp() {
var scroller = document.getElementById("scroller");
var height = scroller.offsetHeight;
scroller.scrollBy(0, -1 * height);
}

View file

@ -153,9 +153,21 @@ header {
justify-content: center;
position: relative;
width: 100%;
bottom: 0;
padding: 2rem;
font-size: x-large;
.down {
bottom: 0;
}
.up {
top: 0;
}
i {
color: {{ .Site.Params.color.secondary }};
cursor: pointer;
}
}
.totop {
@ -297,6 +309,14 @@ header {
}
}
}
:last-child {
.scroll-indicator.down {
display: none;
}
}
}
article {