Skip to content

Commit

Permalink
🔖 v1.5.0 修复错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Dec 20, 2022
1 parent cbde886 commit 7f41eb0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 53 deletions.
4 changes: 4 additions & 0 deletions CHANGE_LOGS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.5.0/2022.12.20
- :bug:修复文档属性title-num打错为titile-num的问题


## v1.4.9/2022.12.17

* ✨新增文档属性-标题自动编号:`title-num:true`
Expand Down
97 changes: 52 additions & 45 deletions style/title-heading.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
counter-reset: h1-counter 0;
} */

.protyle-wysiwyg[custom-titile-num="true"],
.b3-typography[custom-titile-num="true"] {
.protyle-wysiwyg[custom-title-num='true'],
.b3-typography[custom-title-num='true'] {
counter-reset: h2-counter 0 h3-counter 0 h4-counter 0 h5-counter 0 h6-counter 0;
--custom-h-num-font-size: 50%;
--custom-h1-indentation: 0.5em;
Expand All @@ -14,106 +14,113 @@
--custom-h4-indentation: 2em;
--custom-h5-indentation: 2.5em;
--custom-h6-indentation: 3em;


}

.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h2,
.b3-typography[custom-titile-num="true"] > h2 {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h2,
.b3-typography[custom-title-num='true'] > h2 {
counter-increment: h2-counter;
counter-reset: h3-counter 0;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h2::before,
.b3-typography[custom-titile-num="true"] > h2::before {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h2::before,
.b3-typography[custom-title-num='true'] > h2::before {
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
content: counter(h2-counter) '\00A0';
}
.protyle-wysiwyg[custom-titile-num="true"] [data-node-id].h2,
.b3-typography[custom-titile-num="true"] h2 {
.protyle-wysiwyg[custom-title-num='true'] [data-node-id].h2,
.b3-typography[custom-title-num='true'] h2 {
padding-left: 9px;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h2 > [contenteditable][spellcheck]:empty {
.protyle-wysiwyg[custom-title-num='true']
> [data-node-id].h2
> [contenteditable][spellcheck]:empty {
padding-left: var(--custom-h2-indentation);
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h3,
.b3-typography[custom-titile-num="true"] > h3 {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h3,
.b3-typography[custom-title-num='true'] > h3 {
counter-increment: h3-counter;
counter-reset: h4-counter 0;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h3::before,
.b3-typography[custom-titile-num="true"] > h3::before {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h3::before,
.b3-typography[custom-title-num='true'] > h3::before {
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
content: counter(h2-counter) '.' counter(h3-counter) '\00A0';
}
.protyle-wysiwyg[custom-titile-num="true"] [data-node-id].h3,
.b3-typography[custom-titile-num="true"] h3 {
.protyle-wysiwyg[custom-title-num='true'] [data-node-id].h3,
.b3-typography[custom-title-num='true'] h3 {
padding-left: 9px;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h3 > [contenteditable][spellcheck]:empty {
.protyle-wysiwyg[custom-title-num='true']
> [data-node-id].h3
> [contenteditable][spellcheck]:empty {
padding-left: var(--custom-h3-indentation);
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h4,
.b3-typography[custom-titile-num="true"] > h4 {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h4,
.b3-typography[custom-title-num='true'] > h4 {
counter-increment: h4-counter;
counter-reset: h5-counter 0;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h4::before,
.b3-typography[custom-titile-num="true"] > h4::before {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h4::before,
.b3-typography[custom-title-num='true'] > h4::before {
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
content: counter(h2-counter) '.' counter(h3-counter) '.'
counter(h4-counter) '\00A0';
content: counter(h2-counter) '.' counter(h3-counter) '.' counter(h4-counter) '\00A0';
}
.protyle-wysiwyg[custom-titile-num="true"] [data-node-id].h4,
.b3-typography[custom-titile-num="true"] h4 {
.protyle-wysiwyg[custom-title-num='true'] [data-node-id].h4,
.b3-typography[custom-title-num='true'] h4 {
padding-left: 9px;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h4 > [contenteditable][spellcheck]:empty {
.protyle-wysiwyg[custom-title-num='true']
> [data-node-id].h4
> [contenteditable][spellcheck]:empty {
padding-left: var(--custom-h4-indentation);
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h5,
.b3-typography[custom-titile-num="true"] > h5 {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h5,
.b3-typography[custom-title-num='true'] > h5 {
counter-increment: h5-counter;
counter-reset: h6-counter 0;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h5::before,
.b3-typography[custom-titile-num="true"] > h5::before {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h5::before,
.b3-typography[custom-title-num='true'] > h5::before {
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
content: counter(h2-counter) '.' counter(h3-counter) '.'
counter(h4-counter) '.' counter(h5-counter) '\00A0';
content: counter(h2-counter) '.' counter(h3-counter) '.' counter(h4-counter) '.'
counter(h5-counter) '\00A0';
}
.protyle-wysiwyg[custom-titile-num="true"] [data-node-id].h5,
.b3-typography[custom-titile-num="true"] h5 {
.protyle-wysiwyg[custom-title-num='true'] [data-node-id].h5,
.b3-typography[custom-title-num='true'] h5 {
padding-left: 9px;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h5 > [contenteditable][spellcheck]:empty {
.protyle-wysiwyg[custom-title-num='true']
> [data-node-id].h5
> [contenteditable][spellcheck]:empty {
padding-left: var(--custom-h5-indentation);
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h6,
.b3-typography[custom-titile-num="true"] > h6 {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h6,
.b3-typography[custom-title-num='true'] > h6 {
counter-increment: h6-counter;
counter-reset: h7-counter 0;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h6::before,
.b3-typography[custom-titile-num="true"] > h6::before {
.protyle-wysiwyg[custom-title-num='true'] > [data-node-id].h6::before,
.b3-typography[custom-title-num='true'] > h6::before {
display: block !important;
float: left;
font-size: var(--custom-h-num-font-size);
content: counter(h2-counter) '.' counter(h3-counter) '.'
counter(h4-counter) '.' counter(h5-counter) '.' counter(h6-counter) '\00A0';
content: counter(h2-counter) '.' counter(h3-counter) '.' counter(h4-counter) '.'
counter(h5-counter) '.' counter(h6-counter) '\00A0';
}
.protyle-wysiwyg[custom-titile-num="true"] [data-node-id].h6,
.b3-typography[custom-titile-num="true"] h6 {
.protyle-wysiwyg[custom-title-num='true'] [data-node-id].h6,
.b3-typography[custom-title-num='true'] h6 {
padding-left: 9px;
}
.protyle-wysiwyg[custom-titile-num="true"] > [data-node-id].h6 > [contenteditable][spellcheck]:empty {
.protyle-wysiwyg[custom-title-num='true']
> [data-node-id].h6
> [contenteditable][spellcheck]:empty {
padding-left: var(--custom-h6-indentation);
}
/* 👆标题自动编号👆 */
28 changes: 21 additions & 7 deletions theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ body {
font-size: 1.35em !important;
color: var(--custom-h3-color);
}
.protyle-wysiwyg:not([custom-titile-num='true']) [data-node-id].h3 > div:first-child::before,
.protyle-wysiwyg:not([custom-title-num='true']) [data-node-id].h3 > div:first-child::before,
.b3-typography h3:before {
content: '';
display: block;
Expand All @@ -326,7 +326,7 @@ body {
background: var(--custom-h3-color);
}

.protyle-wysiwyg:not([custom-titile-num='true']) [data-node-id].h3 > div:first-child {
.protyle-wysiwyg:not([custom-title-num='true']) [data-node-id].h3 > div:first-child {
/* block 不能改为inline,不然点击旁边不会激活光标! */
display: block !important;
margin-top: 0.15em;
Expand Down Expand Up @@ -1674,12 +1674,26 @@ div[data-subtype='t'][data-type='NodeList'] {

::-webkit-scrollbar-thumb {
background-color: #d5dde2;
border: 2px solid rgba(0,0,0,0);
border: 2px solid rgba(0, 0, 0, 0);
}
::-webkit-scrollbar-thumb {
border-radius: 0px;
-webkit-box-shadow: inset 0 0 10px 10px #d5dde2;
box-shadow: inset 0 0 10px 10px #d5dde2;
background: unset;
border-left: solid 4px transparent;
}
::-webkit-scrollbar-thumb:hover {
border-radius: 0px;
-webkit-box-shadow: inset 0 0 10px 10px #d5dde2;
box-shadow: inset 0 0 10px 10px #d5dde2;
background: unset;
border-left: solid 4px transparent;
}
::-webkit-scrollbar-thumb:hover {
border-left: solid 0px transparent;
border-radius: 0px;
}
::-webkit-scrollbar-thumb{border-radius:0px;-webkit-box-shadow:inset 0 0 10px 10px #d5dde2;box-shadow:inset 0 0 10px 10px #d5dde2;background:unset;border-left:solid 4px transparent}
::-webkit-scrollbar-thumb:hover{border-radius:0px;-webkit-box-shadow:inset 0 0 10px 10px #d5dde2;box-shadow:inset 0 0 10px 10px #d5dde2;background:unset;border-left:solid 4px transparent}
::-webkit-scrollbar-thumb:hover{border-left:solid 0px transparent;border-radius: 0px;}


.b3-typography span[data-type='em'],
.protyle-wysiwyg span[data-type='em'],
Expand Down
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": "Tsundoku Light",
"author": "Achuan-2",
"url": "https://github.com/Achuan-2/siyuan-themes-tsundoku-light",
"version": "1.4.9",
"version": "1.5.0",
"modes": [
"light"
]
Expand Down

0 comments on commit 7f41eb0

Please sign in to comment.