diff --git a/assets/js/main.js b/assets/js/main.js index e69de29..7c2fdbd 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -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); +} diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 674bb4c..1b34c7b 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -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 { diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 3fd2c9c..84e937a 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -1,5 +1,5 @@ {{ define "main" }} -