diff options
Diffstat (limited to 'layouts/partials/single')
| -rw-r--r-- | layouts/partials/single/default.html | 2 | ||||
| -rw-r--r-- | layouts/partials/single/table-of-contents.html | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/layouts/partials/single/default.html b/layouts/partials/single/default.html index 25cda09..9b9b9c3 100644 --- a/layouts/partials/single/default.html +++ b/layouts/partials/single/default.html @@ -1,4 +1,4 @@ -<article class="flex flex-col gap-10"> +<article class="flex flex-col gap-4"> <header class="flex flex-col gap-2"> {{ partial "single/components/title/large" . }} <div class="text-sm font-semibold text-gray-500 flex gap-3"> 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 }} |
