Move the menu stuff to a handler called page.
This commit is contained in:
parent
4532389e3d
commit
352147b7e2
@ -166,11 +166,10 @@ module.exports = {
|
||||
} else {
|
||||
document.querySelector("title").innerHTML = `${url.p.substring(url.p.lastIndexOf("/")+1).toContent().toTitleCase()} | ${$("title").attr("data-site")}`
|
||||
}
|
||||
document.querySelector("nav ul li a[href='./?p=" + (url.p.indexOf("/") == -1 ? url.p : url.p.substring(0, url.p.indexOf("/")) ) + "']").parentNode.classList.add("active");
|
||||
} else {
|
||||
document.querySelector("nav ul li a[href='./']").parentNode.classList.add("active");
|
||||
}
|
||||
|
||||
if (typeof args.page == "function") args.page(a);
|
||||
|
||||
document.querySelectorAll("article").forEach((a) => {
|
||||
if ( a.getAttribute("data-template") != "none" ) {
|
||||
let path = "patterns/" + (a.getAttribute("data-core") == "true" ? "core/" : "") + a.getAttribute("data-path") + "/index.html";
|
||||
|
Loading…
Reference in New Issue
Block a user