diff options
author | WANG Chucheng <me@wangchucheng.com> | 2022-02-06 20:59:04 +0300 |
---|---|---|
committer | WANG Chucheng <me@wangchucheng.com> | 2022-02-06 20:59:04 +0300 |
commit | ddf263db42012fa1a9cdddaf658716503ea93929 (patch) | |
tree | 9f19c86e3699fe11e33b45fe6131039ab3fc12b4 /layouts/partials/components/post-toc.html | |
parent | 022f844c82995cd4b06f4454d3bec755a8fecbb8 (diff) |
style: improve typography
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> |