mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-06 16:15:51 +00:00
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.
5 lines
260 B
HTML
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>
|