From 44a7a4781910cb4eebd6d391abad3c0b909814be Mon Sep 17 00:00:00 2001 From: Tron Date: Thu, 14 Nov 2024 13:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20v2.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- style/editor.css | 1 + style/export.css | 215 +++-------------------------------------------- theme.css | 137 +++++++++++++++++++++++++++++- theme.json | 2 +- 5 files changed, 153 insertions(+), 205 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b852eb..f887d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ -## v2.3.9 / 2024.11.13 +## v2.4.0 / 2024.11.13 - 💄 导出pdf样式优化 - h2标题字体size减小,margin调小 - 修复导出pdf默认20px的问题 - 修复导出pdf table样式消失的问题 - 💄导出预览模式引述块样式优化 +- 💄导出预览模式字体增到到15px ## v2.3.8 / 2024.11.13 - 💄 h2标题样式优化:添加背景色的h2和引述块内的h2没有 bottom border diff --git a/style/editor.css b/style/editor.css index 25ead3c..874fabe 100644 --- a/style/editor.css +++ b/style/editor.css @@ -73,6 +73,7 @@ .protyle-wysiwyg .sb .h2, .protyle-wysiwyg .li>[data-node-id].h2, +.b3-typography blockquote h2, .b3-typography li h2 { /* 💄列表、超级块中的h2不显示竖线 */ border-bottom: 0px solid transparent !important; diff --git a/style/export.css b/style/export.css index 66f489d..ebf8b22 100644 --- a/style/export.css +++ b/style/export.css @@ -1,200 +1,3 @@ -/* Tsundoku 特殊调整的样式放这里,通用的就放theme.css里就好 */ -:root { - /* 主色 */ - /* 高亮 */ - /* --b3-theme-primary: #4285f4; */ - /* 菜单高亮、样式高亮、错误提示,确定删除 */ - --b3-theme-primary: #3ca3ce; - --b3-theme-primary-light: #b9d7e4; - --b3-theme-primary-lighter: #98dbf8; - --b3-theme-primary-lightest: #129ad421; - /* 订阅黄 */ - --b3-theme-secondary: #faad14; - --b3-theme-background: #fff; - --b3-theme-background-light: #c4d2db; - /* 面包屑和标签页 */ - --b3-theme-surface: #edf0f2; - --b3-theme-error: #ec8d8deb; - - /* 文字颜色 */ - --b3-theme-on-primary: #fff; - --b3-theme-on-secondary: #fff; - --b3-theme-on-background: #202124; - /* 主要图标颜色 */ - --b3-theme-on-surface: #5f6368; - --b3-theme-on-error: #fff; - - /* 字体 */ - --b3-font-family: 'Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', 'Hiragino Sans GB', - 'Microsoft Yahei', sans-serif, 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI Emoji', - 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols'; - --b3-font-family-code: 'JetBrainsMono-Regular', mononoki, Consolas, - 'Liberation Mono', Menlo, Courier, monospace, 'Apple Color Emoji', 'Segoe UI Emoji', - 'Noto Color Emoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols'; - --b3-font-family-graph: mononoki; - --b3-font-family-emoji: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji', - 'Twemoji Mozilla', 'Noto Color Emoji', 'Android Emoji'; - --b3-font-family-math: KaTeX_Math; - /* 顶部工具栏 */ - --b3-toolbar-background: #d7dfe4; - --b3-toolbar-blur-background: #d7dfe4; - --b3-toolbar-color: #5f6368; - --b3-toolbar-hover: #c4d2db; - /* 线条 */ - /* --b3-border-color: #dfe0e1; */ - --b3-border-color: #eceded; - - /* 滚动条 m */ - /* --b3-scroll-color: rgba(0, 0, 0, .2); */ - --b3-scroll-color: rgba(5, 50, 80, 0.2); - - /* 列表 */ - /* --b3-list-hover: rgba(0, 0, 0, 0.05); */ - --b3-list-hover: #eaeeef; - /* 页签 */ - --b3-tab-background: #e7edf0; - --b3-tab-background-hover: #dee4e8; - /* 菜单 */ - --b3-menu-background: #ffffff; - /* 提示 */ - --b3-tooltips-color: #fff; - --b3-tooltips-background: #335c7396; - - /* 卡片背景 */ - --b3-card-error-color: #b93128; - --b3-card-error-background: #fdeaec; - --b3-card-warning-color: rgb(102, 60, 0); - --b3-card-warning-background: #fce4d2; - --b3-card-info-color: rgb(13, 60, 97); - --b3-card-info-background: #F0F4F9; - --b3-card-success-color: rgb(30, 70, 32); - --b3-card-success-background: #e5fae5; - /* 自定义文字 */ - --b3-font-color1: #e21e11; - --b3-font-color2: #f1781c; - --b3-font-color3: #2183ce; - --b3-font-color4: #11ad81; - --b3-font-color5: #878484; - --b3-font-color6: #3fada5; - --b3-font-color7: var(--b3-theme-secondary); - --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-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-background5: #e2e3e4; - --b3-font-background6: #d8faff; - --b3-font-background7: #fef7d2; - --b3-font-background8: #f0ede0; - --b3-font-background9: #e9e9ff; - --b3-font-background10: #e5daff; - --b3-font-background11: #f5c7f0; - --b3-font-background12: #FFD8E4; - --b3-font-background13: var(--b3-theme-on-background); - /* PDF */ - --b3-pdf-sidebar-width: 200px; - --b3-pdf-offset: 0; - --b3-pdf-background1: #f4eba3; - --b3-pdf-background2: #9af997; - --b3-pdf-background3: #59c6ff; - --b3-pdf-background4: #ff8280; - --b3-pdf-background5: #faad14; - --b3-pdf-background6: #d4d4d4; - --b3-pdf-background7: #52d4ca; - /* 动画效果 */ - --b3-transition: all 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms; - - /* 阴影 */ - --b3-point-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), - 0px 1px 5px 0px rgba(0, 0, 0, 0.12); - --b3-dialog-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), - 0px 9px 46px 8px rgba(0, 0, 0, 0.12); - - /* diff */ - --b3-diff-add: #dfd; - --b3-diff-add-surface: #97f295; - --b3-diff-del: #fee8e9; - --b3-diff-del-surface: #ffb6ba; - - /* 图表颜色 */ - --b3-graph-p-point: #076f7e; - --b3-graph-heading-point: #660e7a; - --b3-graph-math-point: #80ffa5; - --b3-graph-code-point: #00ddff; - --b3-graph-table-point: #37a2ff; - --b3-graph-list-point: #ff0087; - --b3-graph-todo-point: #ffbf00; - --b3-graph-olist-point: #b3005f; - --b3-graph-listitem-point: #f65b00; - --b3-graph-bq-point: #8d48e3; - --b3-graph-super-point: #dd79ff; - --b3-graph-doc-point: #202124; - --b3-graph-tag-point: #dbf32f; - --b3-graph-asset-point: #05c091; - --b3-graph-line: #5f6368; - --b3-graph-ref-line: #d23f31; - --b3-graph-tag-line: #5f6b06; - --b3-graph-tag-tag-line: #dbf32f; - --b3-graph-asset-line: #037457; - --b3-graph-hl-point: #f3a92f; - --b3-graph-hl-line: #4285f4; - - /* 编辑器搜索颜色 */ - --b3-protyle-search-background: #ffe955; - --b3-protyle-search-border-color: #f2e680; - --b3-protyle-search-current-background: #a5d3fe; - - /* 代码块背景 m */ - --b3-protyle-code-background: #f6f8fa; - - /* 所见即所得行内元素颜色 */ - --b3-protyle-inline-strong-color: #202124; - --b3-protyle-inline-em-color: #202124; - --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-tag-background: #70b3ca; - --b3-protyle-inline-tag-color: #fff; - --b3-protyle-inline-code-color: #3779b3; - --b3-protyle-inline-code-background: #F3F4F4; - --b3-protyle-inline-blockref-color: #0e7a88; - --b3-protyle-inline-blockref-hover-color: #ff398b; - - /* 表格背景设置 */ - --b3-table-border-color: #d1d3d6; - --b3-table-th-color: #e9ecee; - --b3-table-trn-color: #fff; - --b3-table-tr2n-color: var(--b3-theme-background); - /* 高亮 */ - --b3-menu-highlight-color: #068eb8; - --b3-menu-highlight-focus-color: #34495e; - /* 文件树背景高亮颜色 */ - --b3-menu-highlight-background: #dde5ea; - --custom-tab-background: #edf0f2; - --custom-tab-hover-background: #76878d38; - --custom-tab-border: #d3dae27c; - --custom-tab-focus-top-border: #435f6b; - /* 各级标题颜色 */ - --custom-h1-color: rgba(15, 76, 129, 1); - --custom-h2-color: #083256; - --custom-h2-border-color: #dfe0e1; - --custom-h3-color: rgba(15, 76, 129, 1); - --custom-h4-color: #1c849e; - --custom-h5-color: #000000; - --custom-h6-color: var(--b3-theme-on-background); - --custom-blockquote-border-color: #e8e8e8; - --custom-blockquote-background-color: #eaf7ff59; - --custom-tag-hover-color: #559898; - --custom-link-bottom-color: #3375ab; -} - /* ---------------------------------------导出微信文章和pdf样式-----------------------------------*/ /* 导出微信文章设置默认字体 */ @@ -317,18 +120,19 @@ text-align:center; .protyle-preview>.b3-typography blockquote, #preview.protyle-wysiwyg blockquote{ padding: 2px 4px; - background-color: var(--b3-card-info-background); - border: 1px solid var(--custom-blockquote-border-color); + background-color: #F0F4F9; + border: 1px solid #e8e8e8; + color: rgb(13, 60, 97); border-radius: 7px !important; } .protyle-preview>.b3-typography blockquote>blockquote { border: none; - border-left: 0.3em solid var(--b3-font-color3); + border-left: 0.3em solid #2183ce; border-radius: 0px !important; background: transparent !important; } .protyle-preview .b3-typography blockquote[style*='background-color'] { - border: 1px solid var(--custom-blockquote-border-color) !important; + border: 1px solid #e8e8e8 !important; border-radius: 7px !important; } @@ -339,6 +143,10 @@ text-align:center; .protyle-preview .b3-typography blockquote .hljs{ background-color: transparent !important; } +.protyle-preview .b3-typography blockquote[style*='background-color: var(--b3-card-warning-background);']{ + background-color: #fce4d2; + color: rgb(102, 60, 0); +} /* .protyle-preview .b3-typography blockquote[style*='background-color:']{ background-color: #fce4d2 !important; color: rgb(102, 60, 0) !important; @@ -346,6 +154,9 @@ text-align:center; .protyle-preview .b3-typography blockquote[style*='background-color'] span[data-type~=strong]{ color: rgb(102, 60, 0) ; } */ +.b3-typography>p{ +border-radius: 6px; +} /* 加粗 */ .b3-typography strong, .b3-typography span[data-type~=strong], @@ -408,7 +219,7 @@ text-align:center; #preview .protyle-wysiwyg .code-block { /* background: var(--b3-protyle-code-background); */ border-radius: 4px; - box-shadow: none; + /* box-shadow: none; */ } #preview .protyle-wysiwyg .code-block .protyle-action .protyle-action__copy{ diff --git a/theme.css b/theme.css index 58e84ed..f0ef635 100644 --- a/theme.css +++ b/theme.css @@ -30,7 +30,142 @@ /* 搜索样式 */ @import url('style/module/ctrlp.css'); - +:root { + + /* 卡片背景 */ + --b3-card-error-color: #b93128; + --b3-card-error-background: #fdeaec; + --b3-card-warning-color: rgb(102, 60, 0); + --b3-card-warning-background: #fce4d2; + --b3-card-info-color: rgb(13, 60, 97); + --b3-card-info-background: #F0F4F9; + --b3-card-success-color: rgb(30, 70, 32); + --b3-card-success-background: #e5fae5; + /* 自定义文字 */ + --b3-font-color1: #e21e11; + --b3-font-color2: #f1781c; + --b3-font-color3: #2183ce; + --b3-font-color4: #11ad81; + --b3-font-color5: #878484; + --b3-font-color6: #3fada5; + --b3-font-color7: var(--b3-theme-secondary); + --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-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-background5: #e2e3e4; + --b3-font-background6: #d8faff; + --b3-font-background7: #fef7d2; + --b3-font-background8: #f0ede0; + --b3-font-background9: #e9e9ff; + --b3-font-background10: #e5daff; + --b3-font-background11: #f5c7f0; + --b3-font-background12: #FFD8E4; + --b3-font-background13: var(--b3-theme-on-background); + /* PDF */ + --b3-pdf-sidebar-width: 200px; + --b3-pdf-offset: 0; + --b3-pdf-background1: #f4eba3; + --b3-pdf-background2: #9af997; + --b3-pdf-background3: #59c6ff; + --b3-pdf-background4: #ff8280; + --b3-pdf-background5: #faad14; + --b3-pdf-background6: #d4d4d4; + --b3-pdf-background7: #52d4ca; + /* 动画效果 */ + --b3-transition: all 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms; + + /* 阴影 */ + --b3-point-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), + 0px 1px 5px 0px rgba(0, 0, 0, 0.12); + --b3-dialog-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), + 0px 9px 46px 8px rgba(0, 0, 0, 0.12); + + /* diff */ + --b3-diff-add: #dfd; + --b3-diff-add-surface: #97f295; + --b3-diff-del: #fee8e9; + --b3-diff-del-surface: #ffb6ba; + + /* 图表颜色 */ + --b3-graph-p-point: #076f7e; + --b3-graph-heading-point: #660e7a; + --b3-graph-math-point: #80ffa5; + --b3-graph-code-point: #00ddff; + --b3-graph-table-point: #37a2ff; + --b3-graph-list-point: #ff0087; + --b3-graph-todo-point: #ffbf00; + --b3-graph-olist-point: #b3005f; + --b3-graph-listitem-point: #f65b00; + --b3-graph-bq-point: #8d48e3; + --b3-graph-super-point: #dd79ff; + --b3-graph-doc-point: #202124; + --b3-graph-tag-point: #dbf32f; + --b3-graph-asset-point: #05c091; + --b3-graph-line: #5f6368; + --b3-graph-ref-line: #d23f31; + --b3-graph-tag-line: #5f6b06; + --b3-graph-tag-tag-line: #dbf32f; + --b3-graph-asset-line: #037457; + --b3-graph-hl-point: #f3a92f; + --b3-graph-hl-line: #4285f4; + + /* 编辑器搜索颜色 */ + --b3-protyle-search-background: #ffe955; + --b3-protyle-search-border-color: #f2e680; + --b3-protyle-search-current-background: #a5d3fe; + + /* 代码块背景 m */ + --b3-protyle-code-background: #f6f8fa; + + /* 所见即所得行内元素颜色 */ + --b3-protyle-inline-strong-color: #202124; + --b3-protyle-inline-em-color: #202124; + --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-tag-background: #70b3ca; + --b3-protyle-inline-tag-color: #fff; + --b3-protyle-inline-code-color: #3779b3; + --b3-protyle-inline-code-background: #F3F4F4; + --b3-protyle-inline-blockref-color: #0e7a88; + --b3-protyle-inline-blockref-hover-color: #ff398b; + + /* 表格背景设置 */ + --b3-table-border-color: #d1d3d6; + --b3-table-th-color: #e9ecee; + --b3-table-trn-color: #fff; + --b3-table-tr2n-color: var(--b3-theme-background); + /* 高亮 */ + --b3-menu-highlight-color: #068eb8; + --b3-menu-highlight-focus-color: #34495e; + /* 文件树背景高亮颜色 */ + --b3-menu-highlight-background: #dde5ea; + --custom-tab-background: #edf0f2; + --custom-tab-hover-background: #76878d38; + --custom-tab-border: #d3dae27c; + --custom-tab-focus-top-border: #435f6b; + /* 各级标题颜色 */ + --custom-h1-color: rgba(15, 76, 129, 1); + --custom-h2-color: #083256; + --custom-h2-border-color: #dfe0e1; + --custom-h3-color: rgba(15, 76, 129, 1); + --custom-h4-color: #1c849e; + --custom-h5-color: #000000; + --custom-h6-color: var(--b3-theme-on-background); + --custom-blockquote-border-color: #e8e8e8; + --custom-blockquote-background-color: #eaf7ff59; + --custom-tag-hover-color: #559898; + --custom-link-bottom-color: #3375ab; +} .render-node[data-subtype='graphviz'] .graph > polygon { fill: transparent; diff --git a/theme.json b/theme.json index b943f4f..55a028c 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.3.9", + "version": "2.4.0", "displayName": { "default": "Tsundoku", "zh_CN": "積読"