console: add always-visible back-to-top button + collapsible dashboard panels (per-section, persisted)

This commit is contained in:
2026-10-07 15:06:22 +11:00
parent 6f32301540
commit e02e5712d2
4 changed files with 533 additions and 1 deletions

View File

@@ -33,6 +33,7 @@
<main>
{% block content %}{% endblock %}
</main>
<button type="button" id="backToTop" class="back-to-top" aria-label="Back to top" title="Back to top">↑</button>
<script>
(function () {
var root = document.documentElement;
@@ -53,5 +54,15 @@
sync();
})();
</script>
<script>
(function () {
var btn = document.getElementById('backToTop');
if (!btn) return;
btn.addEventListener('click', function () {
(window.scrollTo || function(){ document.documentElement.scrollTop = 0; document.body.scrollTop = 0; })
.call(window, { top: 0, behavior: 'smooth' });
});
})();
</script>
</body>
</html>