From cd06c526af195f89fd00b0c2101678ec1171748a Mon Sep 17 00:00:00 2001 From: Flo Greistorfer Date: Thu, 10 Oct 2024 08:52:50 +0200 Subject: [PATCH] smooth scroll to top --- files/global.css | 2 +- templates/index.html.j2 | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/files/global.css b/files/global.css index 2327d89..8795136 100644 --- a/files/global.css +++ b/files/global.css @@ -90,7 +90,7 @@ figure { .footer a img { height: 22px !important; margin-left: 3px; - vertical-align: text-bottom + vertical-align: text-bottom; } .navbar { diff --git a/templates/index.html.j2 b/templates/index.html.j2 index dd21ae7..0a4a973 100644 --- a/templates/index.html.j2 +++ b/templates/index.html.j2 @@ -182,8 +182,7 @@ } function topFunction() { - document.body.scrollTop = 0; - document.documentElement.scrollTop = 0; + window.scrollTo({ top: 0, behavior: 'smooth' }) } {%- endif %}