diff --git a/static/webui/index.html b/static/webui/index.html index 6c62867e..c228a9ef 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -75,7 +75,7 @@ -
+

diff --git a/static/webui/script.js b/static/webui/script.js index 9948247c..f648809c 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -2738,3 +2738,9 @@ function handleValenceBonusChange(event) { }); }); } + +document.querySelectorAll("#sidebar .nav-link").forEach(function (elm) { + elm.addEventListener("click", function () { + window.scrollTo(0, 0); + }); +}); diff --git a/static/webui/style.css b/static/webui/style.css index 05677dd7..becce85d 100644 --- a/static/webui/style.css +++ b/static/webui/style.css @@ -4,9 +4,19 @@ } body.logged-in #sidebar { - position: sticky; - top: 5rem; - margin-right: 3rem; + position: fixed; + } + + body.logged-in #main-content { + margin-left: 7rem; + } + + body.logged-in:has([data-lang="de"].active) #main-content { + margin-left: 8rem; + } + + body.logged-in:has([data-lang="zh"].active) #main-content { + margin-left: 6rem; } body:not(.logged-in) #sidebar {