diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-07-09 22:10:02 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-07-09 22:10:02 +0200 |
commit | 419882a889df4198f1af811381f1958e23211ceb (patch) | |
tree | eb611322296b785d74628234fb64eff93fda9ed2 /tags.html | |
parent | ddb547694fbc649933328effd1ae08dab5eb1eea (diff) |
Diffstat (limited to 'tags.html')
-rw-r--r-- | tags.html | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -6,6 +6,19 @@ toc: false post: false --- +<div class="dispjs"> + <button onclick="toggle_open(this)" type="button">open all</button> +</div> +<script defer> + function toggle_open(btn) { + const open = btn.hasAttribute("open"); + btn[open ? "removeAttribute" : "setAttribute"]("open", ""); + for (let el of document.getElementsByTagName("details")) { + el[open ? "removeAttribute" : "setAttribute"]("open", ""); + } + btn.innerText = `${open ? "open" : "close"} all`; + } +</script> <ul> {% assign tags = site.data.tags %} {% for tag in tags %} |