From 0c65d1de6f5848ccfcc1925152964c50f04a56e8 Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Fri, 28 Jul 2023 09:39:14 +0700 Subject: [PATCH] fix(toc): tweak TOC --- assets/css/site.css | 8 ++++++-- layouts/partials/toc.html | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/css/site.css b/assets/css/site.css index 29a087c..debddb6 100644 --- a/assets/css/site.css +++ b/assets/css/site.css @@ -108,7 +108,7 @@ code > pre { } pre { - @apply overflow-auto p-4 my-5 rounded-lg drop-shadow-lg;; + @apply overflow-auto p-4 my-5 rounded-lg drop-shadow-lg; } pre > code { @@ -121,10 +121,14 @@ pre > code { /* ################################# */ @media screen and (min-width: 1080px) { #toc { - @apply fixed top-0 left-0 z-40 w-1/4 px-page-gutter py-sidebar-top; + @apply fixed top-sidebar-top left-page-gutter z-40 w-1/4 px-page-gutter py-sidebar-top; } } +#toc summary { + @apply font-bold; +} + #toc-list ol { @apply pl-3 m-1 border-l-2 text-sm text-muted; counter-reset: tocitem; diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index efb2aed..f2dbe2a 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -4,7 +4,7 @@ {{ if gt (.TableOfContents | countwords) 0 }} -
+
Table of contents
{{ .TableOfContents }}