Allow heading levels 1-6 in table of contents
Adjust minimum and maximum levels to allow all headings and fix CSS to style indentation and nested lists properly in jekyll-toc and Kramdown generated table of contents. Fixes #1782
This commit is contained in:
parent
cd14423918
commit
3b77428c49
2 changed files with 15 additions and 8 deletions
|
@ -38,7 +38,7 @@ layout: default
|
||||||
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
|
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
|
||||||
<nav class="toc">
|
<nav class="toc">
|
||||||
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
|
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
|
||||||
{% include toc.html sanitize=true html=content h_min=2 h_max=3 class="toc__menu" %}
|
{% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" %}
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -540,16 +540,23 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
li ul > li a {
|
li ul > li a {
|
||||||
padding-left: 1.75rem;
|
padding-left: 1.5rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hide sub sub links on small screens*/
|
li ul li ul > li a {
|
||||||
li > ul li {
|
padding-left: 2rem;
|
||||||
display: none;
|
}
|
||||||
|
|
||||||
@include breakpoint($medium) {
|
li ul li ul li ul > li a {
|
||||||
display: block;
|
padding-left: 2.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li ul li ul li ul li ul > li a {
|
||||||
|
padding-left: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
li ul li ul li ul li ul li ul > li a {
|
||||||
|
padding-left: 3.5rem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue