Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/components/post-toc.html')
-rw-r--r--layouts/partials/components/post-toc.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/partials/components/post-toc.html b/layouts/partials/components/post-toc.html
new file mode 100644
index 0000000..66fd401
--- /dev/null
+++ b/layouts/partials/components/post-toc.html
@@ -0,0 +1,11 @@
+<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>
+<div class="sticky-toc hidden lg:block px-6 pb-6 {{ if eq .Type "docs" }} pt-10 -mt-10 border-l {{ end }}">
+ {{ .TableOfContents }}
+</div>
+<script>
+ window.addEventListener('DOMContentLoaded', () => {
+ enableStickyToc();
+ });
+</script> \ No newline at end of file