1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-24 19:47:11 -07:00

Better TOC.

This commit is contained in:
Cedric Beust 2015-12-01 20:15:48 -08:00
parent e52dfcc1da
commit ff89245e06
6 changed files with 16 additions and 9 deletions

View file

@ -3,11 +3,19 @@
border-radius: 10px;
}
.toc-item {
.toc-item-0 {
margin-top: 10px;
font-size: 120%;
font-weight: bold;
padding: 2px;
}
.toc-item-1 {
padding: 2px;
}
.toc-item a:hover {
text-decoration: none;
background: #48D1CC;
display: block;
}

View file

@ -9,7 +9,7 @@
<!-- Bootstrap core CSS -->
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/kobalt.css" rel="stylesheet" />
<!-- Optional Bootstrap Theme -->

View file

@ -9,11 +9,11 @@
<!-- Bootstrap core CSS -->
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/kobalt.css" rel="stylesheet" />
<!-- Optional Bootstrap Theme -->
<link href="data:text/css;charset=utf-8," data-href="../bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
<link href="data:text/css;charset=utf-8," data-href="../bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

View file

@ -9,7 +9,7 @@
<!-- Bootstrap core CSS -->
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/kobalt.css" rel="stylesheet" />
<!-- Optional Bootstrap Theme -->

View file

@ -105,7 +105,7 @@ function generateToc() {
//} else if (ind < currentLevel) {
// toc += '</ul>\n';
//}
toc += '<div class="toc-item"><a href="#' + section.id + '">' + content + '</a></div>\n';
toc += '<div class="toc-item toc-item-' + ind + '"><a href="#' + section.id + '">' + content + '</a></div>\n';
currentLevel = ind;
}
toc += "</ul>\n";

View file

@ -9,12 +9,11 @@
<!-- Bootstrap core CSS -->
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/kobalt.css" rel="stylesheet" />
<!-- Optional Bootstrap Theme -->
<link href="data:text/css;charset=utf-8," data-href="../bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
<link href="data:text/css;charset=utf-8," data-href="../bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!--