From c980ced2fbb77ff5cf0ebe551e128e2f59396ebe Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sun, 5 Nov 2023 17:41:59 -0600 Subject: [PATCH] Remove back to top button It's kind of ugly and weird, and probably not necessary. I might add it back in the future if it's actually needed again. --- assets/css/bobastyle.css | 21 --------------------- assets/js/bobatheme.js | 10 ---------- layouts/_default/baseof.html | 12 ------------ 3 files changed, 43 deletions(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index 835de3e..baf1360 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -361,23 +361,6 @@ h1 svg.icon { /* }}} */ -/* Back to top {{{ */ -#top { - font-size: 0; -} -#back-to-top { - position: fixed; - float: right; - bottom: 25px; - right: 25px; - background-color: var(--background-1); - color: var(--text-1); - border-radius: 100%; - padding: 12px; - display: none; -} -/* }}} */ - /* Skip to main content {{{ */ #skip-to-main { position: absolute; @@ -989,10 +972,6 @@ aside.quote { .table-of-contents.print { display: block; } - - #back-to-top { - display: none !important; - } } /* }}} */ diff --git a/assets/js/bobatheme.js b/assets/js/bobatheme.js index efb9efe..2abfd28 100644 --- a/assets/js/bobatheme.js +++ b/assets/js/bobatheme.js @@ -1,13 +1,3 @@ -// back to top -const backToTop = document.getElementById("back-to-top"); -window.onscroll = function() { - if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { - backToTop.style.display = "block"; - } else { - backToTop.style.display = "none"; - } -} - // code block copy to clipboard window.onload = () => { document.querySelectorAll(".code-block").forEach(codeBlock => { diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d764107..3813b1f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,20 +4,8 @@ {{ partial "head.html" . }} - Skip to main content - - {{ partial "icon.html" "chevron-up" }} - - - {{ partial "top.html" . }}