mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Rearrange sidebar modnav builder to more logical order
This commit is contained in:
parent
2e1e627430
commit
0c932b763d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user