From b46dff280d75eba1ac472d444c00fe242d8179ee Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Fri, 4 Sep 2020 00:00:37 +0200 Subject: [PATCH] fix: better big screen navigation scroll --- assets/development/scripts/home.js | 4 +++- assets/development/styles/home.css | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/development/scripts/home.js b/assets/development/scripts/home.js index ae1cdd1..01422b5 100644 --- a/assets/development/scripts/home.js +++ b/assets/development/scripts/home.js @@ -194,7 +194,9 @@ function enableTag(node) { closeMenu() document.getElementsByClassName('content')[0].scrollIntoView(true) } else { - document.getElementsByClassName('up-footer')[0].scrollIntoView(true) + if (window.scrollY() > 300) { + document.getElementsByClassName('content')[0].scrollIntoView(true) + } } } diff --git a/assets/development/styles/home.css b/assets/development/styles/home.css index 84d76e3..2348034 100644 --- a/assets/development/styles/home.css +++ b/assets/development/styles/home.css @@ -76,6 +76,7 @@ .content { padding-top: 1.5em; display: flex; + padding-bottom: 1em; }