From 7e31eac1d6b2a2a4bf2b7e3368fa76f4b3db15d6 Mon Sep 17 00:00:00 2001 From: Tron Date: Sat, 16 Nov 2024 21:43:25 +0800 Subject: [PATCH] v2.4.2 / 2024.11.16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 💄 优化导出到微信公众号的引述块样式 - 💄 更改高亮样式 --- CHANGELOG.md | 6 + style/editor.css | 10 +- style/export.css | 256 +++++++++++++++++++++++++++++++++ style/theme/Tsundoku_light.css | 20 +-- theme.css | 16 +-- theme.json | 2 +- 6 files changed, 288 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 254d00b..7b558c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ + +## v2.4.2 / 2024.11.16 + +- 💄 优化导出到微信公众号的引述块样式 +- 💄 更改高亮样式 + ## v2.4.1 / 2024.11.16 - 💄 取消对blockquote折叠的特殊处理 #120 diff --git a/style/editor.css b/style/editor.css index 874fabe..a2f28d1 100644 --- a/style/editor.css +++ b/style/editor.css @@ -536,9 +536,10 @@ mark { transition: color 0.2s ease-in-out; background-color: var(--b3-card-success-background); border-bottom: 2px solid var(--b3-font-color4); */ - background: transparent; - box-shadow: 0 -0.3em 0 0 inset var(--b3-protyle-inline-mark-background), - 0 0.1em 0 0 var(--b3-protyle-inline-mark-background); + background: var(--b3-protyle-inline-mark-background); + /* box-shadow: 0 -0.3em 0 0 inset var(--b3-protyle-inline-mark-background), + 0 0.1em 0 0 var(--b3-protyle-inline-mark-background); */ + border-bottom: 2px solid var(--b3-font-color4); color: inherit; } @@ -896,4 +897,5 @@ li[data-type='navigation-file'] .counter { .protyle-wysiwyg [data-node-id].hr>div:after { height: 2px; background-color: var(--b3-table-border-color) !important; -} \ No newline at end of file +} + diff --git a/style/export.css b/style/export.css index ebf8b22..48a5385 100644 --- a/style/export.css +++ b/style/export.css @@ -165,6 +165,18 @@ border-radius: 6px; font-weight: bold; color: inherit; } + /* 高亮 */ + .b3-typography mark, + .b3-typography span[data-type~=mark] { + background-color: #C9EDD1; + box-shadow: none; + border-bottom: 2px solid #37be35; + color: #000; + } + .b3-typography code:not(.hljs), + .b3-typography span[data-type~=code]{ + border-radius: 6px; + } /* 分割线 */ .b3-typography hr { border: 0; @@ -187,6 +199,9 @@ border-radius: 6px; .b3-typography table th{ font-size: 13px !important; } + + + /* ---------------------------------------导出pdf-----------------------------------*/ @@ -248,4 +263,245 @@ border-radius: 6px; color: var(--b3-protyle-inline-link-color); text-decoration: none; border-bottom: 1px solid var(--custom-link-bottom-color); +} + + + +/* 导出到微信公众号引述块优化 */ +.protyle-preview>.b3-typography blockquote[style*='background-color: #fdeaec;']>blockquote { + border-left: 0.3em solid #e21e11 !important; + color: #b93128; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #fce4d2;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #f1781c !important; + color: rgb(102, 60, 0); +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #F0F4F9']>blockquote { + border-left: 0.3em solid #2183ce !important; + color: rgb(13, 60, 97); +} + + + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e5fae5']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #11ad81 !important; + color: rgb(30, 70, 32); +} + + + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e2e3e4;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #878484 !important; + color: #878484; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #d8faff;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #3fada5 !important; + color: #3fada5; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #fef7d2;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #faad14 !important; + color: #faad14; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #f0ede0;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #a3431f !important; + color: #a3431f; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e9e9ff;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #596ab7 !important; + color: #596ab7; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e5daff;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #944194 !important; + color: #944194; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #f5c7f0;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #d447c5 !important; + color: #d447c5; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #FFD8E4;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #ee2e68 !important; + color: #ee2e68; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #202124;']>blockquote { + border-radius: 0px !important; + border-left: 0.3em solid #fff !important; + color: #fff !important; +} + +/* 引述块添加卡片背景色,嵌套引述块的border颜色可以进一步修改*/ +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #fdeaec'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #e21e11 !important; + color: #e21e11 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #fce4d2;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #f1781c !important; + color: #f1781c !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #F0F4F9;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #2183ce !important; + color: #2183ce !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #e5fae5;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #11ad81 !important; + color: #11ad81 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #e2e3e4;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #878484 !important; + color: #878484 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #d8faff;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #3fada5 !important; + color: #3fada5 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #fef7d2;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #faad14 !important; + color: #faad14 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #f0ede0;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #a3431f !important; + color: #a3431f !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #e9e9ff;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #596ab7 !important; + color: #596ab7 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #e5daff;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #944194 !important; + color: #944194 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #f5c7f0;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #d447c5 !important; + color: #d447c5 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #FFD8E4;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #ee2e68 !important; + color: #ee2e68 !important; +} + +.protyle-preview>.b3-typography blockquote blockquote[style*='background-color: #202124;'] { + border: 0 !important; + border-radius: 0px !important; + background-color: transparent !important; + border-left: 0.3em solid #202124 !important; + color: #202124 !important; +} + +/* 引述块颜色 */ +.protyle-preview>.b3-typography blockquote[style*='background-color: #fdeaec'] { + color: #e21e11 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #fce4d2;'] { + color: #f1781c !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #F0F4F9;'] { + color: #2183ce !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e5fae5;'] { + color: #11ad81 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e2e3e4;'] { + color: #878484 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #d8faff;'] { + color: #3fada5 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #fef7d2;'] { + color: #faad14 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #f0ede0;'] { + color: #a3431f !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e9e9ff;'] { + color: #596ab7 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #e5daff;'] { + color: #944194 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #f5c7f0;'] { + color: #d447c5 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #FFD8E4;'] { + color: #ee2e68 !important; +} + +.protyle-preview>.b3-typography blockquote[style*='background-color: #202124;'] { + color: #202124 !important; } \ No newline at end of file diff --git a/style/theme/Tsundoku_light.css b/style/theme/Tsundoku_light.css index 2ec30b7..29f37e5 100644 --- a/style/theme/Tsundoku_light.css +++ b/style/theme/Tsundoku_light.css @@ -76,17 +76,17 @@ --b3-font-color4: #11ad81; --b3-font-color5: #878484; --b3-font-color6: #3fada5; - --b3-font-color7: var(--b3-theme-secondary); + --b3-font-color7: #faad14; --b3-font-color8: #a3431f; --b3-font-color9: #596ab7; --b3-font-color10: #944194; --b3-font-color11: #d447c5; --b3-font-color12: #ee2e68; - --b3-font-color13: var(--b3-theme-background); + --b3-font-color13: #fff; --b3-font-background1: #FEDADE; - --b3-font-background2: var(--b3-card-warning-background); - --b3-font-background3: var(--b3-card-info-background); - --b3-font-background4: var(--b3-card-success-background); + --b3-font-background2: #fce4d2; + --b3-font-background3: #F0F4F9; + --b3-font-background4: #e5fae5; --b3-font-background5: #e2e3e4; --b3-font-background6: #d8faff; --b3-font-background7: #fef7d2; @@ -95,7 +95,7 @@ --b3-font-background10: #e5daff; --b3-font-background11: #f5c7f0; --b3-font-background12: #FFD8E4; - --b3-font-background13: var(--b3-theme-on-background); + --b3-font-background13: #202124; /* PDF */ --b3-pdf-sidebar-width: 200px; --b3-pdf-offset: 0; @@ -158,7 +158,7 @@ --b3-protyle-inline-s-color: #9ba0ad; --b3-protyle-inline-link-color: #3375ab; --b3-protyle-inline-link-hover-color: #2094f3; - --b3-protyle-inline-mark-background: #82d695a8; + --b3-protyle-inline-mark-background: #C9EDD1; --b3-protyle-inline-mark-color: #202124; --b3-protyle-inline-tag-background: #70b3ca; --b3-protyle-inline-tag-color: #fff; @@ -249,6 +249,7 @@ background-color: rgba(7, 97, 214, 0.445); color: white; } + /* 前进后退disable颜色更改 */ .toolbar__item--disabled, .toolbar__item--disabled:hover { @@ -293,11 +294,12 @@ } /* 引述块行内代码样式优化 */ -.protyle-wysiwyg [data-node-id].bq span[data-type~='kbd'], -.protyle-wysiwyg [data-node-id].bq span[data-type~='code'] { +.protyle-wysiwyg [data-node-id].bq span[data-type~='kbd'], +.protyle-wysiwyg [data-node-id].bq span[data-type~='code'] { color: var(--b3-card-info-color); background-color: #bedaeb52 } + /* 引述块内的代码块 */ .bq .code-block { background: #f6f8fa66 !important; diff --git a/theme.css b/theme.css index f0ef635..dfbd36e 100644 --- a/theme.css +++ b/theme.css @@ -48,17 +48,17 @@ --b3-font-color4: #11ad81; --b3-font-color5: #878484; --b3-font-color6: #3fada5; - --b3-font-color7: var(--b3-theme-secondary); + --b3-font-color7: #faad14; --b3-font-color8: #a3431f; --b3-font-color9: #596ab7; --b3-font-color10: #944194; --b3-font-color11: #d447c5; --b3-font-color12: #ee2e68; - --b3-font-color13: var(--b3-theme-background); + --b3-font-color13: #fff; --b3-font-background1: #FEDADE; - --b3-font-background2: var(--b3-card-warning-background); - --b3-font-background3: var(--b3-card-info-background); - --b3-font-background4: var(--b3-card-success-background); + --b3-font-background2: #fce4d2; + --b3-font-background3: #F0F4F9; + --b3-font-background4: #e5fae5; --b3-font-background5: #e2e3e4; --b3-font-background6: #d8faff; --b3-font-background7: #fef7d2; @@ -67,7 +67,7 @@ --b3-font-background10: #e5daff; --b3-font-background11: #f5c7f0; --b3-font-background12: #FFD8E4; - --b3-font-background13: var(--b3-theme-on-background); + --b3-font-background13: #202124; /* PDF */ --b3-pdf-sidebar-width: 200px; --b3-pdf-offset: 0; @@ -130,8 +130,8 @@ --b3-protyle-inline-s-color: #9ba0ad; --b3-protyle-inline-link-color: #3375ab; --b3-protyle-inline-link-hover-color: #2094f3; - --b3-protyle-inline-mark-background: #82d695a8; - --b3-protyle-inline-mark-color: #202124; + --b3-protyle-inline-mark-background: #C9EDD1; + --b3-protyle-inline-mark-color:#202124; --b3-protyle-inline-tag-background: #70b3ca; --b3-protyle-inline-tag-color: #fff; --b3-protyle-inline-code-color: #3779b3; diff --git a/theme.json b/theme.json index 663645a..8de1d5f 100644 --- a/theme.json +++ b/theme.json @@ -2,7 +2,7 @@ "name": "Tsundoku", "author": "Achuan-2", "url": "https://github.com/Achuan-2/siyuan-themes-tsundoku", - "version": "2.4.1", + "version": "2.4.2", "displayName": { "default": "Tsundoku", "zh_CN": "積読"