You've already forked no-js-hugo-theme
Added optional page table of contents
You can use the 'tableofcontents' front matter option to enable or disable the display of a table of contents. Setting this option will override the new site-wide parameter 'tableofcontentswordcount' which will automatically add a table of contents on pages with more than the specified number of words. Set to '0' to always show a table of contents, or set to '-1' to never show a table of contents (the default behaviour).
This commit is contained in:
@ -112,6 +112,38 @@ blockquote {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
.table-of-contents {
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
padding: 1em;
|
||||
margin-bottom: 2em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.table-of-contents nav > ul {
|
||||
/* only the most-parent ul element */
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.table-of-contents ul {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.table-of-contents li {
|
||||
margin-top: 0.8em;
|
||||
}
|
||||
|
||||
.table-of-contents ul ul {
|
||||
list-style: none;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
|
||||
.table-of-contents-title {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.links {
|
||||
font-size: 120%;
|
||||
list-style-type: none;
|
||||
|
Reference in New Issue
Block a user