mirror of https://github.com/istio/istio.io.git
TOC display and highlight current document in left nav (#95)
* toc CSS and JS fixes * highlight current doc in left nav
This commit is contained in:
parent
f447eec8cb
commit
55a037737b
|
|
@ -75,7 +75,12 @@ function outputNavBarTree(items) {
|
|||
var item = items[i];
|
||||
|
||||
if (item.children.length == 0) {
|
||||
document.write("<li class='doc-side-nav-list-item'><a href='");
|
||||
if (item.doc.url == location.pathname) {
|
||||
document.write("<li class='doc-side-nav-list-item'><a class='current' href='");
|
||||
}
|
||||
else {
|
||||
document.write("<li class='doc-side-nav-list-item'><a href='");
|
||||
}
|
||||
document.write("{{home}}");
|
||||
document.write(item.doc.url);
|
||||
document.write("'>");
|
||||
|
|
|
|||
Loading…
Reference in New Issue