generated docs: highlight active package

This commit is contained in:
Andrew Kelley 2019-10-07 21:03:04 -04:00
parent 2e26aaa70c
commit ffc0c26b27
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 13 additions and 1 deletions

View File

@ -94,7 +94,10 @@
background-color: #555;
color: #fff;
}
#listPkgs li a.active {
background-color: #FFBB4D;
color: #000;
}
#logo {
width: 8em;
padding: 0.5em 1em;
@ -170,6 +173,10 @@
background-color: #555;
color: #fff;
}
#listPkgs li a.active {
background-color: #FFBB4D;
color: #000;
}
#listSearchResults li.selected {
background-color: #000;
}

View File

@ -220,6 +220,11 @@
var aDom = liDom.children[0];
aDom.textContent = list[i].name;
aDom.setAttribute('href', navLinkPkg(list[i].pkg));
if (list[i].name === curNav.pkgNames[0]) {
aDom.classList.add("active");
} else {
aDom.classList.remove("active");
}
}
domSectPkgs.classList.remove("hidden");