mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-23 17:48:30 +00:00
Order branches
This commit is contained in:
parent
4dd0506da2
commit
3c434f4efe
3 changed files with 29 additions and 8 deletions
|
@ -11,14 +11,13 @@ window.addEventListener("load", function() {
|
|||
}
|
||||
|
||||
let nav = document.querySelector("nav");
|
||||
let sections = new Array();
|
||||
sections.push([document.querySelector("main"), null]);
|
||||
let sections = [[document.querySelector("main"), null]];
|
||||
for (let section of document.querySelectorAll("section")) {
|
||||
let id = section.getAttribute("id");
|
||||
let link = nav.querySelector("a[href=\\#" + id.replace(/\//g, "\\/") + "]");
|
||||
if (link !== null) {
|
||||
link = link.parentElement;
|
||||
link.classList.remove("active")
|
||||
link.classList.remove("active");
|
||||
sections.push([section, link]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue