diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 49e6061e..f818e85e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,6 +9,7 @@ · Theme PaperMod +{{- if (not .Site.Params.disableScrollToTop) }} +{{- end }} {{- partial "extend_footer.html" . -}} {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} @@ -34,6 +36,11 @@ document.getElementById('menu').scrollLeft = localStorage.getItem("menu-scroll-position"); } } + + function menu_on_scroll() { + localStorage.setItem("menu-scroll-position", document.getElementById('menu').scrollLeft); + } + document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener("click", function (e) { e.preventDefault(); @@ -52,6 +59,11 @@ } }); }); + + + +{{- if (not .Site.Params.disableScrollToTop) }} + +{{- end }} + {{- if (not .Site.Params.disableThemeToggle) }}