Add post: 暗黑能天使
This commit is contained in:
21
layouts/partials/components/post-toc.html
Normal file
21
layouts/partials/components/post-toc.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div
|
||||
class="{{ if eq .Type "docs" }}
|
||||
bg-secondary-bg
|
||||
{{ else }}
|
||||
bg-primary-bg
|
||||
{{ end }} prose sticky top-16 z-10 hidden px-6 py-4 lg:block"
|
||||
>
|
||||
<h3>{{ i18n "onThisPage" }}</h3>
|
||||
</div>
|
||||
<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>
|
||||
Reference in New Issue
Block a user