Rearrange sidebar modnav builder to more logical order

This commit is contained in:
Michael Howell 2024-07-18 19:49:32 -07:00 committed by GitHub
parent 2e1e627430
commit 0c932b763d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -531,13 +531,13 @@ function preLoadCss(cssUrl) {
link.href = path;
link.textContent = name;
const li = document.createElement("li");
li.appendChild(link);
ul.appendChild(li);
// Don't "optimize" this to just use `path`.
// We want the browser to normalize this into an absolute URL.
if (link.href === current_page) {
li.classList.add("current");
}
li.appendChild(link);
ul.appendChild(li);
}
sidebar.appendChild(h3);
sidebar.appendChild(ul);