mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-02-15 08:01:12 +01:00
Fix: remove submodule
This commit is contained in:
14
themes/hugo-theme-yue/layouts/_partials/page/toc.html
Normal file
14
themes/hugo-theme-yue/layouts/_partials/page/toc.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ $tocAvailable := gt (len .TableOfContents) 32 }} {{- /* length of empty TOC is 32 */ -}}
|
||||
{{ $tocEnabled := default site.Params.toc .Params.toc }}
|
||||
{{ $tocFolded := default site.Params.tocFolded .Params.tocFolded }}
|
||||
{{ $tocStatus := "" }} {{- /* folded by default */ -}}
|
||||
{{ if eq $tocFolded false }}
|
||||
{{ $tocStatus = " open" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and $tocEnabled $tocAvailable }}
|
||||
<details class="toc"{{ $tocStatus | safeHTMLAttr }}>
|
||||
<summary class="toc__summary">{{ i18n "tableOfContents" }}</summary>
|
||||
{{ .TableOfContents }}
|
||||
</details>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user