console: add always-visible back-to-top button + collapsible dashboard panels (per-section, persisted)
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user