aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/single/table-of-contents.html
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-06-14 16:44:29 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-06-14 16:44:29 +0200
commitb07d4ff0dfe2267013e3be729b58fb2a83c2deb8 (patch)
tree447d336e4302205d0eb729f15ccddb9d224e127e /layouts/partials/single/table-of-contents.html
parent8a9ca0e0bac3284ecb8c028029380532a1978a9d (diff)
feat: Table of content
Diffstat (limited to 'layouts/partials/single/table-of-contents.html')
-rw-r--r--layouts/partials/single/table-of-contents.html17
1 files changed, 11 insertions, 6 deletions
diff --git a/layouts/partials/single/table-of-contents.html b/layouts/partials/single/table-of-contents.html
index b8489bc..05689a1 100644
--- a/layouts/partials/single/table-of-contents.html
+++ b/layouts/partials/single/table-of-contents.html
@@ -1,6 +1,11 @@
-{{ if and .TableOfContents .Params.tableOfContents }}
- <aside class="table-of-contents">
- <h2 class="title-small">{{ i18n "summary" }}</h2>
- {{ .TableOfContents }}
- </aside>
-{{ end }} \ No newline at end of file
+{{ if and .TableOfContents (ne .Params.tableOfContents false) }}
+<details class="table-of-contents">
+ <summary class="toc-header">
+ <span>On this page</span>
+ <svg class="toc-chevron" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <polyline points="4 6 8 10 12 6" />
+ </svg>
+ </summary>
+ {{ .TableOfContents }}
+</details>
+{{ end }}