mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-12 19:50:39 +00:00
add a collapsible ToC
This commit is contained in:
parent
1d9c0e4a44
commit
a287d11246
4 changed files with 26 additions and 4 deletions
layouts
|
@ -24,8 +24,10 @@
|
|||
</ul>
|
||||
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false)) }}
|
||||
<aside class="mainTOC">
|
||||
<h3>Table of Contents</h3>
|
||||
{{ .TableOfContents }}
|
||||
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
|
||||
<summary>Table of Contents</summary>
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
</aside>
|
||||
{{end}}
|
||||
{{partial "textprocessing.html" . }}
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
<article>
|
||||
{{ if (and $.Site.Data.config.enableToc (ne .Params.enableToc false)) }}
|
||||
<aside class="mainTOC">
|
||||
<h3>Table of Contents</h3>
|
||||
{{ .TableOfContents }}
|
||||
<details {{ if $.Site.Data.config.openToc }}open {{ end }}>
|
||||
<summary>Table of Contents</summary>
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
</aside>
|
||||
{{end}}
|
||||
{{partial "textprocessing.html" . }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue