Skip to content

Commit

Permalink
fix: 解决 Heading自动编号问题 和 选择标签问题
Browse files Browse the repository at this point in the history
  • Loading branch information
bug320 committed Jul 29, 2024
1 parent 6b4bc1d commit 740cf88
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 4 deletions.
65 changes: 62 additions & 3 deletions style/custom/custom-f-bt-autoheading.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,39 @@

.protyle-wysiwyg:not([custom-f~="bt"]),
.b3-typography {
counter-reset: h1-counter 0 h2-counter 0 h3-counter 0 h4-counter 0 h5-counter 0 h6-counter 0;
counter-reset: h1-counter ;
}

.protyle-wysiwyg:not([custom-f~="bt"])>.h1,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h1,
.b3-typography>h1 {
counter-increment: h1-counter;
counter-reset: h2-counter 0;
}

.protyle-wysiwyg:not([custom-f~="bt"])>.h2,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h2,
.b3-typography>h2 {
counter-increment: h2-counter;
counter-reset: h3-counter 0;
}

.protyle-wysiwyg:not([custom-f~="bt"])>.h3,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h3,
.b3-typography>h3 {
counter-increment: h3-counter;
counter-reset: h4-counter 0;
}

.protyle-wysiwyg:not([custom-f~="bt"])>.h4,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h4,
.b3-typography>h4 {
counter-increment: h4-counter;
counter-reset: h5-counter 0;
}

.protyle-wysiwyg:not([custom-f~="bt"])>.h5,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h5,
.b3-typography>h5 {
counter-increment: h5-counter;
counter-reset: h6-counter 0;
Expand All @@ -50,14 +55,17 @@
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
content: counter(h1-counter) "\00A0";
content: counter(h1-counter) "\00A0" !important;

}


.protyle-wysiwyg:not([custom-f~="bt"])>.h2::before,
.b3-typography>h2::before {
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
font-size: var(--custom-h-num-font-size)!important;

content: counter(h1-counter) "." counter(h2-counter) "\00A0";
}

Expand Down Expand Up @@ -94,6 +102,7 @@
} */

.protyle-wysiwyg>.h6::before,
.protyle-wysiwyg [data-node-id][fold="1"].h6,
.b3-typography>h6::before {
display: block !important;
float: left;
Expand Down Expand Up @@ -184,3 +193,53 @@
border-left: 3px solid var(--custom-h5-color);
padding-left: 9px;
}




.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h1::before,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h2::before,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h3::before,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h4::before,
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h5::before

{
position: absolute !important;
color: var(--v-block-heading-color) !important;

top: 10px !important;
left: 0px !important;
font-size: 60% !important;
width: 100% !important;
border-radius: 0 !important;

height: 3px !important;
border-radius: var(--v-block-heading-border-radius);
background: linear-gradient(0deg, var(--v-block-heading-start-bg-color), var(--v-block-heading-end-bg-color));
letter-spacing: .15em;
}
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h1::before
{
content: counter(h1-counter) "\00A0" !important;
}
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h2::before
{
content: counter(h1-counter) "." counter(h2-counter) "\00A0";
}
.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h3::before
{
content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) "\00A0";

}

.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h4::before
{
content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "\00A0";

}

.protyle-wysiwyg:not([custom-f~="bt"]) [data-node-id][fold="1"].h5::before
{
content: counter(h1-counter) "." counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "." counter(h5-counter) "\00A0";
}

2 changes: 1 addition & 1 deletion theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mini-vlook",
"author": "路人二",
"url": "https://github.com/idea-zone/mini-vlook",
"version": "3.0.15",
"version": "3.1.1",
"displayName": {
"default": "mini-vlook(简洁版vlook)",
"zh_CN": "mini-vlook(简洁版vlook)",
Expand Down

0 comments on commit 740cf88

Please sign in to comment.