From 10e1de196a2da6b2466ce4c51acaa20bf1d40a3d Mon Sep 17 00:00:00 2001 From: Asheklm6 Date: Tue, 22 Oct 2024 15:23:39 +0100 Subject: [PATCH] feature/add-subtle-scroll-to-top-button --- docs/index.html | 3 +++ docs/style.css | 45 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 186719a..0e4e39a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1026,4 +1026,7 @@

Name

+
+ To Top +
diff --git a/docs/style.css b/docs/style.css index cc52d08..b19f351 100644 --- a/docs/style.css +++ b/docs/style.css @@ -26,4 +26,47 @@ span.distinct { main ul li { margin-bottom: .5em; -} \ No newline at end of file +} + +.scroll-container { + position: absolute; + top: 0; + right: 50px; + height: 100%; + z-index: 1000; + } + + .scroll-container:before { + content: ''; + display: block; + height: 100vh; + pointer-events: none; + } + + .scroll-container a { + position: sticky; + top: 88vh; + cursor: pointer; + font-size: 20px; + } + + @media (max-width: 600px) { + .scroll-container { + position: fixed; + right: 10px; + top: auto; + bottom: 20px; + z-index: 1000; + } + + .scroll-container a { + font-size: 16px; + top: auto; + bottom: 10px; + } + } + +html{ + scroll-behavior: smooth; + position: relative; +}