add: multiple pages in one entry, details syntax
This commit is contained in:
parent
db63427795
commit
a127a0407d
3 changed files with 217 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue