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:
parent
e52dfcc1da
commit
ff89245e06
6 changed files with 16 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
<!-- 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">
|
||||
|
||||
|
||||
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<!--
|
||||
<script src="../bootstrap/assets/js/ie-emulation-modes-warning.js"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue