tagliatelle

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 37571ecc2e5744a574550f2454a16269f691cd9f
parent f5dc905ae2d88df7b55e6213452ca9cb66d34c5c
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Tue, 30 Jun 2026 10:20:06 +0100

Open tag list on navigation there

Diffstat:
Astatic/list-open.js | 13+++++++++++++
Mtemplates/tags.html | 1+
2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/static/list-open.js b/static/list-open.js @@ -0,0 +1,12 @@ + function openTagDetailsFromHash() { + if (!window.location.hash) return; + const target = document.getElementById(window.location.hash.slice(1)); + if (!target) return; + const details = target.closest('details'); + if (details) { + details.open = true; + target.scrollIntoView(); + } + } + window.addEventListener('DOMContentLoaded', openTagDetailsFromHash); + window.addEventListener('hashchange', openTagDetailsFromHash); +\ No newline at end of file diff --git a/templates/tags.html b/templates/tags.html @@ -12,5 +12,6 @@ {{end}} <script src="/static/list-filter.js" defer></script> +<script src="/static/list-open.js" defer></script> {{template "_footer"}} \ No newline at end of file