From 37650c5d27fb7e159dc39ca39af67576be000c0e Mon Sep 17 00:00:00 2001 From: yvling Date: Fri, 20 Dec 2024 00:59:02 +0800 Subject: [PATCH] fix: Fixed some bugs in post toc --- templates/default/assets/css/post.css | 36 +++++++++++++++++++++++++++ templates/default/html/post.html | 8 +++--- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/templates/default/assets/css/post.css b/templates/default/assets/css/post.css index 1578b22..34edbde 100644 --- a/templates/default/assets/css/post.css +++ b/templates/default/assets/css/post.css @@ -81,6 +81,7 @@ tr, th, td { } #toc-box-area { + width: 250px; position: fixed; top: 4rem; left: 30px; @@ -101,6 +102,41 @@ tr, th, td { color: var(--primary-color); } +#toc-box { + max-height: 500px; + overflow-y: scroll; +} + #toc-box li { list-style: none; +} + +#toc-box .li-1 { + font-size: 16px; + padding-left: 0; +} + +#toc-box .li-2 { + font-size: 15px; + padding-left: 10px; +} + +#toc-box .li-3 { + font-size: 14px; + padding-left: 20px; +} + +#toc-box .li-4 { + font-size: 13px; + padding-left: 30px; +} + +#toc-box .li-5 { + font-size: 12px; + padding-left: 40px; +} + +#toc-box .li-6 { + font-size: 11px; + padding-left: 50px; } \ No newline at end of file diff --git a/templates/default/html/post.html b/templates/default/html/post.html index 758157b..cf0a7fb 100644 --- a/templates/default/html/post.html +++ b/templates/default/html/post.html @@ -22,7 +22,7 @@
-
+
{{ range $i, $v := .menu.Items }} {{ $v.Name }} @@ -32,7 +32,7 @@
-
+
{{ .status.toc_title }}

@@ -58,7 +58,7 @@ {{ if .status.success }}
-