mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 04:48:12 +08:00
Add the auto-generated node catalog to the website's user manual (#3662)
* Generate the MVP node catalog in the manual (with some placeholders) * Implement nearly the rest of everything * Move to the tools directory and make it generate nicer default values * Add category descriptions * Organize file structure and improve type naming * Improve book table of contents code * Add collapsing chapter navigation to the book template * Add to build workflow * Clean up site structure
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.querySelectorAll(".tree-node").forEach((toggle) => {
|
||||
toggle.addEventListener("click", (event) => {
|
||||
// Prevent link click from also toggling parent
|
||||
if (event.target instanceof HTMLElement && event.target.tagName === "A") return;
|
||||
|
||||
const nestedList = toggle.parentElement?.querySelector(".nested");
|
||||
if (nestedList) {
|
||||
toggle.classList.toggle("expanded");
|
||||
nestedList.classList.toggle("active");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Expand the first level by default
|
||||
const firstLevel = document.querySelector(".structure-outline > ul > li > .tree-node");
|
||||
if (firstLevel instanceof HTMLElement) firstLevel.click();
|
||||
});
|
||||
Reference in New Issue
Block a user