From 16600ee15914d99868aecf4f58bfe1373a3d2379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 8 May 2023 22:11:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Move=20to=20top=20gap=20between?= =?UTF-8?q?=20content=20and=20icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/compiled/main.css | 4 ++-- assets/js/appearance.js | 10 +++++++++- layouts/partials/footer.html | 2 +- layouts/partials/scroll-to-top.html | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 522cab74..df31a4c8 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1403,8 +1403,8 @@ select { top: 5rem; } -.top-\[100vh\] { - top: 100vh; +.top-\[110vh\] { + top: 110vh; } .top-\[11px\] { diff --git a/assets/js/appearance.js b/assets/js/appearance.js index 0acf9f18..2d7385ec 100644 --- a/assets/js/appearance.js +++ b/assets/js/appearance.js @@ -64,4 +64,12 @@ var updateMeta = () => { elem = document.querySelector('body'); style = getComputedStyle(elem); document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor); -} \ No newline at end of file +} + +window.addEventListener("DOMContentLoaded", (event) => { + const scroller = document.getElementById("top-scroller"); + const footer = document.getElementById("site-footer"); + if(scroller.getBoundingClientRect().top > footer.getBoundingClientRect().top) { + scroller.hidden = true; + } +}); \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 964f4b79..dadd2c08 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,4 +1,4 @@ -