add: multiple pages in one entry, details syntax

This commit is contained in:
trisua 2025-08-14 03:11:46 -04:00
parent db63427795
commit a127a0407d
3 changed files with 217 additions and 4 deletions

View file

@ -349,3 +349,20 @@ globalThis.toggle_metadata_css = (e) => {
window.location.reload();
}
};
globalThis.hash_check = (hash) => {
if (hash.startsWith("#/")) {
for (const x of Array.from(document.querySelectorAll(".subpage"))) {
x.classList.add("hidden");
}
document.getElementById(hash).classList.remove("hidden");
}
};
window.addEventListener("hashchange", (_) => hash_check(window.location.hash));
setTimeout(() => {
// run initial hash check
hash_check(window.location.hash);
}, 150);

View file

@ -709,3 +709,20 @@ table tr:not(thead *):nth-child(odd) {
table thead th {
text-align: left;
}
/* details */
details {
width: 100%;
margin: var(--pad-4) 0;
}
details summary {
background: var(--color-super-raised);
padding: var(--pad-2) var(--pad-4);
cursor: pointer;
}
details .content {
padding: var(--pad-4);
background: var(--color-surface);
}