mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-25 03:57: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;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item {
|
.toc-item-0 {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 120%;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc-item-1 {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc-item a:hover {
|
.toc-item a:hover {
|
||||||
|
text-decoration: none;
|
||||||
background: #48D1CC;
|
background: #48D1CC;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
|
|
||||||
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="../css/kobalt.css" rel="stylesheet" />
|
||||||
|
|
||||||
<!-- Optional Bootstrap Theme -->
|
<!-- Optional Bootstrap Theme -->
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
|
|
||||||
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="../css/kobalt.css" rel="stylesheet" />
|
||||||
|
|
||||||
<!-- Optional Bootstrap Theme -->
|
<!-- 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]-->
|
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
|
|
||||||
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="../css/kobalt.css" rel="stylesheet" />
|
||||||
|
|
||||||
<!-- Optional Bootstrap Theme -->
|
<!-- Optional Bootstrap Theme -->
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ function generateToc() {
|
||||||
//} else if (ind < currentLevel) {
|
//} else if (ind < currentLevel) {
|
||||||
// toc += '</ul>\n';
|
// 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;
|
currentLevel = ind;
|
||||||
}
|
}
|
||||||
toc += "</ul>\n";
|
toc += "</ul>\n";
|
||||||
|
|
|
@ -9,12 +9,11 @@
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
|
|
||||||
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="../css/kobalt.css" rel="stylesheet" />
|
||||||
|
|
||||||
<!-- Optional Bootstrap Theme -->
|
<!-- 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]-->
|
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
<!--
|
<!--
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue