1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-25 03:57:11 -07:00

try to make site more intuitive

This commit is contained in:
Juan Liska 2016-01-05 05:23:50 -06:00
parent de753349e3
commit 6112dda189
5 changed files with 614 additions and 558 deletions

View file

@ -9,6 +9,14 @@ var content = [
url: "../home/index.html",
title: "Home"
},
{
url: "../getting-started/index.html",
title: "Getting Started"
},
{
url: "../idea-plug-in/index.html",
title: "IDEA plug-in"
},
{
url: "../documentation/index.html",
title: "Documentation"
@ -21,17 +29,9 @@ var content = [
url: "../plug-in-development/index.html",
title: "Writing a Kobalt plug-in"
},
{
url: "../idea-plug-in/index.html",
title: "IDEA plug-in"
},
{
url: "../ten-minutes/index.html",
title: "Ten minutes"
},
{
url: "../contributing/index.html",
title: "Contributing"
title: "Contribute"
}
];
@ -50,14 +50,15 @@ var after = '</ul>'
+ '</nav>'
;
function generateNavBar(index) {
function generateNavBar() {
var result = before;
for (var i = 0; i < content.length; i++) {
var cls = "";
if (index == i) {
var c = content[i];
var cleanUrl = c.url.replace("../", "")
if (window.location.href.indexOf(cleanUrl) > -1) {
cls = 'class="active"';
}
var c = content[i];
result += '<li ' + cls + '><a href="' + c.url + '">' + c.title + '</a></li>';
}
result += after;