// noinspection JSUnresolvedVariable const {$, doAfterLoad, footer, header, nav, showPage, stringToHtml} = window.fwdekker; const unpackEntry = function (entry, depth = 0) { const subEntries = entry.entries.length === 0 ? "" : ``; return "" + `` + `${entry.name}` + subEntries + ``; }; doAfterLoad(() => { $("#nav").appendChild(nav("/Tools/")); $("#header").appendChild(header({title: "Tools", description: "An overview of tools I have created"})); $("#footer").appendChild(footer({ vcsURL: "https://git.fwdekker.com/FWDekker/tools/", version: "v%%VERSION_NUMBER%%" })); showPage(); fetch("https://fwdekker.com/api/nav/") .then(it => it.json()) .then(json => json.entries.find(it => it.name === "Tools")) .then(json => stringToHtml(``, "ul")) .then(listing => $("#listing").append(listing)); });