Improve table of contents

- Replace html snippet with _includes/toc.html
- Add FA icon to table of contents header
- Display table of contents on small screens
- Add hierarchy to toc with indents
This commit is contained in:
Michael Rose
2015-01-21 10:16:48 -05:00
parent 3688b97b3c
commit 9a1c5ff3e6
3 changed files with 18 additions and 26 deletions

View File

@@ -450,9 +450,8 @@ $button-size: 1.5rem;
/* Table of contents */
.toc {
display: none;
font-size: 95%;
@media #{$small} {
@media #{$large} {
display: block;
@include grid(12,2);
@include prefix(12,0.5);
@@ -503,13 +502,16 @@ $button-size: 1.5rem;
}
ul {
margin: 1px 0 0;
li a {
padding-left: 20px;
}
}
}
}
/* TOC trigger for collapsing */
#drawer {
height: 100%;
max-height: 100%;
overflow: hidden;
&.js-hidden {
max-height: 0;