Files
HugoBlox-kit/wowchemy/layouts/shortcodes/toc.html
T
George Cushen 468d327370 feat(shortcode): make in-page ToC collapsable
Useful for long pages with large ToCs and/or on small screens.

Also add `hide_on` and `show_on` options accepting Bootstrap responsive breakpoints.

Useful for setting `{{< toc hide_on="xl" >}}` in conjunction with Book layout which only shows right sidebar ToC on XL screens and above.
2021-01-09 20:59:42 +00:00

5 lines
260 B
HTML

<details class="toc-inpage d-print-none {{with .Get "hide_on"}}d-{{.}}-none{{end}} {{with .Get "show_on"}}d-none d-{{.}}-block{{end}}" open>
<summary class="font-weight-bold">{{ i18n "table_of_contents" }}</summary>
{{ $.Page.TableOfContents }}
</details>