feat: add collapsible table of contents for smaller screens (#1245)

* refactor: create partial/article/components/toc

* feat: add collapsible table of contents for smaller screens
This commit is contained in:
Jimmy
2026-01-26 22:28:27 +01:00
committed by GitHub
parent 3a03d69502
commit 0f33b3efb7
4 changed files with 157 additions and 72 deletions
+3 -1
View File
@@ -6,7 +6,9 @@
<h2 class="widget-title section-title">{{ T "article.tableOfContents" }}</h2>
<div class="widget--toc">
{{ .Context.TableOfContents }}
<nav class="toc-nav" id="TableOfContents">
{{ partial "article/components/toc" .Context | safeHTML }}
</nav>
</div>
</section>
{{ end }}