refactor main.js into smaller pieces, and moved navbar.js to assets

This commit is contained in:
Aaron Qian 2022-11-10 23:23:50 -08:00 committed by Aaron Qian
parent fd8eeb3330
commit 177dffe553
No known key found for this signature in database
GPG key ID: BF1A987C395B5B0E
19 changed files with 214 additions and 207 deletions

View file

@ -49,9 +49,6 @@ var isMobile = false, isTablet = false, isLaptop = false;
elems = toc.getElementsByTagName("li");
for (let i = 0; i < elems.length; i++) {
elems[i].classList.add("nav-item");
if (isMobile) {
elems[i].setAttribute("onclick", "toggleTOC()");
}
}
// add "nav-link" class to the "a" elements
elems = toc.getElementsByTagName("a");