diff options
Diffstat (limited to 'layouts/partials/components/post-toc.html')
-rw-r--r-- | layouts/partials/components/post-toc.html | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/layouts/partials/components/post-toc.html b/layouts/partials/components/post-toc.html index 337ecb6..46de312 100644 --- a/layouts/partials/components/post-toc.html +++ b/layouts/partials/components/post-toc.html @@ -1,11 +1,21 @@ -<div class="sticky top-16 z-10 hidden lg:block px-6 py-4 {{ if eq .Type "docs" }} bg-secondary-bg pt-16 -mt-16 {{ else }} bg-primary-bg {{ end }}"> - <span class="text-lg font-semibold">{{ i18n "onThisPage" }}</span> +<div + class="{{ if eq .Type "docs" }} + bg-secondary-bg + {{ else }} + bg-primary-bg + {{ end }} prose sticky top-16 z-10 hidden max-w-none px-6 py-4 lg:block" +> + <h3>{{ i18n "onThisPage" }}</h3> </div> -<div class="sticky-toc hidden lg:block px-6 pb-6 {{ if eq .Type "docs" }} pt-10 -mt-10 border-s {{ end }}"> - {{ .TableOfContents }} +<div + class="sticky-toc {{ if eq .Type "docs" }} + border-s + {{ end }} hidden px-6 pb-6 lg:block" +> + {{ .TableOfContents }} </div> <script> - window.addEventListener('DOMContentLoaded', () => { - enableStickyToc(); - }); -</script>
\ No newline at end of file + window.addEventListener("DOMContentLoaded", () => { + enableStickyToc(); + }); +</script> |