From 1378120f92a3e9fb20a801d03b168beab4017d2d Mon Sep 17 00:00:00 2001 From: sumruler Date: Sun, 22 Dec 2024 18:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=AF=BC=E5=87=BAhtml=E7=9A=84?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E8=AE=BE=E7=BD=AE=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phycat/phycat.dark.css | 39 ++++++++++++++++++++++++-------- phycat/phycat.light.css | 49 ++++++++++++++++++++++++----------------- 2 files changed, 59 insertions(+), 29 deletions(-) diff --git a/phycat/phycat.dark.css b/phycat/phycat.dark.css index ee61fd8..9278d36 100644 --- a/phycat/phycat.dark.css +++ b/phycat/phycat.dark.css @@ -249,10 +249,13 @@ h4 { h5 { counter-reset: h6; } + .sidebar-content { counter-reset: h1 } - +.outline-content { + counter-reset: h1 +} .outline-h1 { counter-reset: h2 } @@ -308,14 +311,16 @@ h5 { counter-increment: h1; content: var(--autonum-h1); } - +.outline-content .outline-h1>.outline-item>.outline-label:before{ + counter-increment: h1; + content: var(--autonum-h1); +} #write span.md-toc-item.md-toc-h1>a:before { counter-increment: h1toc; content: var(--autonum-h1toc); } - #write h2:before { counter-increment: h2; content: var(--autonum-h2); @@ -324,14 +329,16 @@ h5 { counter-increment: h2; content: var(--autonum-h2); } - +.outline-content .outline-h2>.outline-item>.outline-label:before { + counter-increment: h2; + content: var(--autonum-h2); +} #write span.md-toc-item.md-toc-h2>a:before { counter-increment: h2toc; content: var(--autonum-h2toc); } - #write h3 > span::before { counter-increment: h3; content: var(--autonum-h3); @@ -340,7 +347,10 @@ h5 { counter-increment: h3; content: var(--autonum-h3); } - +.outline-content .outline-h3>.outline-item>.outline-label:before { + counter-increment: h3; + content: var(--autonum-h3); +} #write span.md-toc-item.md-toc-h3>a:before { counter-increment: h3toc; content: var(--autonum-h3toc); @@ -356,12 +366,16 @@ h5 { counter-increment: h4; content: var(--autonum-h4); } - +.outline-content .outline-h4>.outline-item>.outline-label:before { + counter-increment: h4; + content: var(--autonum-h4); +} #write span.md-toc-item.md-toc-h4>a:before { counter-increment: h4toc; content: var(--autonum-h4toc); } + #write h5 > span::before { counter-increment: h5; content: var(--autonum-h5); @@ -370,12 +384,16 @@ h5 { counter-increment: h5; content: var(--autonum-h5); } - +.outline-content .outline-h5>.outline-item>.outline-label:before { + counter-increment: h5; + content: var(--autonum-h5); +} #write span.md-toc-item.md-toc-h5>a:before { counter-increment: h5toc; content: var(--autonum-h5toc); } + #write h6 > span::before { counter-increment: h6; content: var(--autonum-h6); @@ -384,7 +402,10 @@ h5 { counter-increment: h6; content: var(--autonum-h6); } - +.outline-content .outline-h6>.outline-item>.outline-label:before { + counter-increment: h6; + content: var(--autonum-h6); +} #write span.md-toc-item.md-toc-h6>a:before { counter-increment: h6toc; content: var(--autonum-h6toc); diff --git a/phycat/phycat.light.css b/phycat/phycat.light.css index 17c49b9..3f1265c 100644 --- a/phycat/phycat.light.css +++ b/phycat/phycat.light.css @@ -234,7 +234,7 @@ h6:after { vertical-align: inherit; } -/* 标题自动编号 Write区域*/ +/* 标题自动编号 */ #write { counter-reset: h1; } @@ -262,7 +262,9 @@ h5 { .sidebar-content { counter-reset: h1 } - +.outline-content { + counter-reset: h1 +} .outline-h1 { counter-reset: h2 } @@ -314,25 +316,29 @@ h5 { counter-increment: h1; content: var(--autonum-h1); } - #outline-content li.outline-h1>div>span.outline-label:before { counter-increment: h1; content: var(--autonum-h1); } - +.outline-content .outline-h1>.outline-item>.outline-label:before{ + counter-increment: h1; + content: var(--autonum-h1); +} #write span.md-toc-item.md-toc-h1>a:before { counter-increment: h1toc; content: var(--autonum-h1toc); } - #write h2:before { counter-increment: h2; content: var(--autonum-h2); color: var(--head-title-h2-color); } - -#outline-content li.outline-h2>div>span.outline-label:before { +.outline-content .outline-h2>.outline-item>.outline-label:before { + counter-increment: h2; + content: var(--autonum-h2); +} +li.outline-h2>div>a.outline-label:before { counter-increment: h2; content: var(--autonum-h2); } @@ -343,79 +349,82 @@ h5 { } - #write h3>span::before { counter-increment: h3; content: var(--autonum-h3); color: var(--element-color); } - #outline-content li.outline-h3>div>span.outline-label:before { counter-increment: h3; content: var(--autonum-h3); } - +.outline-content .outline-h3>.outline-item>.outline-label:before { + counter-increment: h3; + content: var(--autonum-h3); +} #write span.md-toc-item.md-toc-h3>a:before { counter-increment: h3toc; content: var(--autonum-h3toc); } - #write h4>span::before { counter-increment: h4; content: var(--autonum-h4); color: var(--element-color); } - #outline-content li.outline-h4>div>span.outline-label:before { counter-increment: h4; content: var(--autonum-h4); } - +.outline-content .outline-h4>.outline-item>.outline-label:before { + counter-increment: h4; + content: var(--autonum-h4); +} #write span.md-toc-item.md-toc-h4>a:before { counter-increment: h4toc; content: var(--autonum-h4toc); } - #write h5>span::before { counter-increment: h5; content: var(--autonum-h5); color: var(--element-color); } - #outline-content li.outline-h5>div>span.outline-label:before { counter-increment: h5; content: var(--autonum-h5); } - +.outline-content .outline-h5>.outline-item>.outline-label:before { + counter-increment: h5; + content: var(--autonum-h5); +} #write span.md-toc-item.md-toc-h5>a:before { counter-increment: h5toc; content: var(--autonum-h5toc); } - #write h6>span::before { counter-increment: h6; content: var(--autonum-h6); color: var(--element-color); } - #outline-content li.outline-h6>div>span.outline-label:before { counter-increment: h6; content: var(--autonum-h6); } - +.outline-content .outline-h6>.outline-item>.outline-label:before { + counter-increment: h6; + content: var(--autonum-h6); +} #write span.md-toc-item.md-toc-h6>a:before { counter-increment: h6toc; content: var(--autonum-h6toc); } - /* 列表 */ ::marker { color: var(--element-color-deep);