Files
hugo-theme-stack/layouts/_partials/article/article.html
T
JimmyandGitHub 0f33b3efb7 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
2026-01-26 22:28:27 +01:00

27 lines
864 B
HTML

<article class="{{ if .Params.image }}has-image {{ end }}main-article">
{{ partial "article/components/header" . }}
{{ if .Scratch.Get "TOCEnabled" }}
<aside class="article-toc">
<details>
<summary>
<div class="article-toc-title">
{{ partial "helper/icon" "chevron-right" }}
<span>{{ T "article.tableOfContents" }}</span>
</div>
</summary>
<nav class="toc-nav">
{{ partial "article/components/toc" . | safeHTML }}
</nav>
</details>
</aside>
{{ end }}
{{ partial "article/components/content" . }}
{{ partial "article/components/footer" . }}
{{ if or .Params.math .Site.Params.article.math }}
{{ partialCached "article/components/math.html" . }}
{{ end }}
</article>