Skip to content

Commit

Permalink
🔖 v2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Apr 30, 2024
1 parent 85f9be2 commit add0823
Show file tree
Hide file tree
Showing 10 changed files with 299 additions and 285 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## v2.0.6 / 2024.04.30
- ✨ 思源笔记预览模式直接复制到微信公众号适配
- 🔥 取消link icon,需要的可用集市的[链接图标]插件
- 💄 超链接样式调整
- 💄 备注样式调整,取消背景色,变为橙色下划线
- 💄 适配思源v3.0.12的图标样式
- 💄 代码块样式修改
- 调整代码行号宽度
- 调整代码语言位置
- 调整代码内容与左侧的间隔
- 💄 标题样式修改
- h3 标题样式:左边添加竖线
- h1 标题样式:居中加下划线
- 💄优化导出pdf的超链接下划线样式

## v2.0.5 / 2024.04.26
- 💄 高亮样式优化,参考Asri主题

Expand Down
31 changes: 14 additions & 17 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,21 @@

## 🚀最近更新

v2.0.5 / 2024.04.26
- 💄 高亮样式优化,参考Asri主题

v2.0.4 / 2024.04.22
- 💄 优化块右上角所属数据库的样式:添加padding
- 💄 修改标题颜色
- 💄 blockquote样式修改,参考Github样式


v2.0.3 / 2024.04.16
- 🐛 修复Dark主题link icon 失效
- 💄 块右上方的数据库角标样式优化:模仿标签样式,添加背景颜色和文字颜色,隐藏数据库图标
- 🐛 Dark主题行内代码每个文字被间隔开

v2.0.2 / 2024.04.15
- 🔥 取消表格默认居中
- 🔥 取消集市样式调整
v2.0.6 / 2024.04.30
- ✨ 思源笔记预览模式直接复制到微信公众号适配
- 🔥 取消link icon,需要的可用集市的[链接图标]插件
- 💄 超链接样式调整
- 💄 备注样式调整,取消背景色,变为橙色下划线
- 💄 适配思源v3.0.12的图标样式
- 💄 代码块样式修改
- 调整代码行号宽度
- 调整代码语言位置
- 调整代码内容与左侧的间隔
- 💄 标题样式修改
- h3 标题样式:左边添加竖线
- h1 标题样式:居中加下划线
- 💄优化导出pdf的超链接下划线样式



全部更新日志请见 [CHANGELOG](./CHANGELOG.md)
Expand Down
101 changes: 42 additions & 59 deletions style/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
font-size: 1.75em !important;
padding: 0.3em 4px;
color: var(--custom-h1-color);
border-bottom: 2px solid var(--custom-h1-color);
border-radius: 0px !important;
margin-bottom: 1.5em;
}

/* 列表中的一级标题不居中 */
Expand All @@ -65,56 +68,32 @@
}

/* 3. 三级标题样式setup */

.protyle-wysiwyg [data-node-id].h3,
.b3-typography h3 {
/* ⚙三级标题基本样式 */
font-size: 1.35em !important;
.protyle-wysiwyg [data-node-id].h3, .b3-typography h3{
font-size: 1.35em;
color: var(--custom-h3-color);
/* color: var(--b3-card-info-color); */
/* background-color: #d1ecf7; */
/* box-shadow: 2px 2px 2px var(--b3-table-border-color); */
text-align: left;
font-weight: bold;
padding-left: 8px;
border-left: 5px solid var(--custom-h3-color);
border-radius: 0px !important;
/* 控制竖线高度 */
line-height: 1.25;
height: 1.25 em;
}

/* 三级标题前面添加竖线*/
/* .protyle-wysiwyg:not([custom-title-num='true']) [data-node-id].h3 > div:first-child::before,
.b3-typography h3:before {
content: '';
display: block;
float: left;
height: 0.75em;
width: 0.125em;
font-size: 1.35em !important;
margin-right: 8px;
margin-top: 0.07em;
background: var(--custom-h3-color);
} */

/* 调整h3空行时光标位置 */
/* .protyle-wysiwyg .h3 > [spellcheck='false']:empty {
padding-left: 1rem;
.protyle-wysiwyg .h3 > [spellcheck='false']:empty {
/* empty的高度需要等于line-height */
height: 1.25em;
}
/* 列表下适配 */
.protyle-wysiwyg [data-node-id].li > .protyle-action ~ .h3{
line-height: 1.5 !important;
height: 1.5em !important;
}
.protyle-wysiwyg .li > .h3 > [spellcheck='false']:empty {
/* empty的高度需要等于line-height */
height: 1.5em;
}
.protyle-wysiwyg .h3 > [spellcheck='false']:empty:before {
content: '';
display: block;
height: 0.15em;
margin-top: -0.3em;
margin-left: -1rem;
} */

/* 列表中h3特殊调整 */
/* .protyle-wysiwyg .li > .h3 > div:first-child:before {
margin-top: 0.27em !important;
} */
/* 列表下三级标题竖线不显示 */
/* .protyle-wysiwyg .li > [data-node-id].h3 > div:first-child::before,
.b3-typography h3:before {
display: none !important;
} */
/* 调整h3空行时光标位置 */
/* .protyle-wysiwyg .li > .h3 > [spellcheck='false']:empty {
padding-left: 0rem !important;
} */

/* 4. 四级标题样式setup */
.protyle-wysiwyg [data-node-id].h4,
Expand Down Expand Up @@ -227,14 +206,13 @@
.protyle-wysiwyg [data-node-id].bq:not([style*='background-color']) {
/* border: 1px solid var(--custom-blockquote-border-color); */
padding: 2px 4px;
border-left: 0.3em solid #d0d7de;
border-radius: 0px 7px 7px 0px !important;
border-left: 0em solid #4c6778;
background-color: #73a8c70f;
border: 1px solid var(--custom-blockquote-border-color);
border-radius: 7px !important;
color: #6a6969;
background-color: transparent;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

.protyle-wysiwyg [data-node-id].bq[style*='background-color'] {
border: 1px solid var(--custom-blockquote-border-color) !important;
border-radius: 7px !important;
Expand Down Expand Up @@ -628,14 +606,16 @@ li[data-type='navigation-file'] .counter {
.b3-typography span[data-type~='code'],
.protyle-wysiwyg code:not(.hljs),
.protyle-wysiwyg span[data-type~='code'] {
/* margin: 0px 2px 0px; */
margin: 0px 2px 0px;
top: -0.1em;
color: var(--b3-protyle-inline-code-color);
font-size: 80%;
word-break: break-all;
background-color: var(--b3-protyle-inline-code-background);
}

#preview .protyle-wysiwyg span[data-type~='code'] {
margin: 0px;
}
/* 调整kbd标签 */
.b3-typography kbd,
.protyle-wysiwyg kbd,
Expand Down Expand Up @@ -665,7 +645,10 @@ li[data-type='navigation-file'] .counter {

.protyle-wysiwyg [data-node-id] span[data-type~='a']:hover {
color: var(--b3-protyle-inline-link-hover-color);
border-bottom: 1px solid var(--b3-protyle-inline-link-hover-color);
border-bottom: 2px solid var(--b3-protyle-inline-link-hover-color);
}
[data-theme-mode="light"] .protyle-wysiwyg [data-node-id] span[data-type~='a']:hover {
background-color: #f1f9ff;
}
.protyle-wysiwyg [data-node-id] span[data-type~='a']:hover code {
color: var(--b3-protyle-inline-link-hover-color);
Expand All @@ -686,13 +669,13 @@ li[data-type='navigation-file'] .counter {
/* ------------------------------设置备注样式 ------------------------------ */
.b3-typography span[data-type~='inline-memo'],
.protyle-wysiwyg span[data-type~='inline-memo'] {
background-color: #fffccf;
border-bottom: 2px solid #fff001;
background-color: transparent;
border-bottom: 3px solid var(--b3-font-color1);
}

.tooltip--memo {
border-top: 3px solid #fff001;
background-color: #fffccf;
border-top: 3px solid #eec175;
background-color: #ffedcf;
padding: 1rem 1rem;
font-size: 1rem;
color: var(--b3-theme-on-background);
Expand Down
159 changes: 153 additions & 6 deletions style/export.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,166 @@
#preview .h1 {
text-align: center !important;


/* ---------------------------------------导出微信文章和pdf样式-----------------------------------*/
/* 导出微信文章设置默认字体 */
.protyle-preview>.b3-typography {
font-size: 14px !important;
}


[data-theme-mode="light"] .protyle-preview>.b3-typography h1,
#preview .protyle-wysiwyg .h1{
font-weight: bold;
border-bottom: 2px solid rgba(15, 76, 129, 1);
text-align: center;
color: rgba(15, 76, 129, 1);

}
.protyle-preview>.b3-typography h1{
font-size: 24px !important;
}
[data-theme-mode="dark"] .protyle-preview>.b3-typography h2{
display: table;
text-align: center;
margin: 40px auto 40px;
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h2,
#preview .protyle-wysiwyg .h2 {
display: table;
text-align: center;
border-bottom: 1px solid #dfe0e1 !important;
color: #083256;
border-radius: 0px;
line-height: 1.75;
margin: 40px auto 40px;
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h2{
font-size: 20px !important;

}

[data-theme-mode="light"] .protyle-preview>.b3-typography h3,
#preview .protyle-wysiwyg .h3 {

text-align: left;
font-weight: bold;
margin: 1em 8px 0.75em 0;
padding-left: 8px;
border-left: 4px solid rgba(15, 76, 129, 1);
color: rgba(15, 76, 129, 1) !important;
border-radius: 0px !important;
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h3{
font-size: 16px !important;
}

[data-theme-mode="light"] .protyle-preview .b3-typography h4,
#preview .protyle-wysiwyg .h4 {
font-weight: bold;
color: #1c849e;
}
[data-theme-mode="light"] .protyle-preview .b3-typography h4{
font-size: 15px !important;
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h5,
#preview .protyle-wysiwyg .h5 {
font-weight: bold;
color: rgba(15, 76, 129, 1);
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h5{
font-size: 14px !important;
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h6,
#preview .protyle-wysiwyg .h6{
font-size: 14px !important;
font-weight: bold;
}
[data-theme-mode="light"] .protyle-preview>.b3-typography h6{
font-size: 14px !important;
}
/* 图片居中 */
#preview .protyle-wysiwyg .p:has(span.img),
[data-theme-mode="light"] .protyle-preview>.b3-typography p:has(span.img:only-child) {
text-align:center;
}
/* 超链接 */
[data-theme-mode="light"] .protyle-preview>.b3-typography a {
color: #338dd6;
/* text-decoration: underline; */

}
/* 行内代码 */
[data-theme-mode="light"] .protyle-preview>.b3-typography span[data-type~='code']{
color:#3779b3;
background-color:#f3f4f4;
}
/* 代码块 */
[data-theme-mode="light"] .protyle-preview>.b3-typography .hljs {
background-color: #f8f9fa;
}
/* 表格框线 */
[data-theme-mode="light"] .protyle-preview>.b3-typography table tr th,
[data-theme-mode="light"] .protyle-preview>.b3-typography table tr td{
border-color: #d1d3d6;
}

/* 引述块 */
[data-theme-mode="light"] .protyle-preview>.b3-typography blockquote,
#preview.protyle-wysiwyg blockquote{
border-left: 0em solid #4c6778;
background-color: #73a8c70f;
border: 1px solid rgb(224 239 249);
border-radius: 7px !important;
}

/* ---------------------------------------导出pdf-----------------------------------*/


/* 设置导出样式 */
@media print {
:root {
font-family: var(--b3-font-family);
}
}
/* 导出的链接样式 */
#preview a {
color: var(--b3-protyle-inline-link-color);
}


/* 导出pdf设置默认字体 */
#preview .protyle-wysiwyg{
font-size: 17px !important;
}
/* 去除导出pdf的列表竖线 */
#preview .protyle-wysiwyg [data-node-id].li:before {
border-left: 0.5px solid transparent;
}
/* pdf的a标签 */
#preview .protyle-wysiwyg a {
color: var(--b3-protyle-inline-link-color);
text-decoration: none;
border-bottom: 1px solid var(--custom-link-bottom-color);
}
/* 代码块 */
#preview .protyle-wysiwyg .code-block {
padding: 0;
background: var(--b3-protyle-code-background);
border-radius: 4px;
box-shadow: none;
}

/* ---------------------------------------导出图片-----------------------------------*/
/* 行内代码优化 */
.export-img .protyle-wysiwyg span[data-type~='code']{
margin-left: 0px;
margin-right: 0px;
}
.export-img .protyle-wysiwyg span[data-type~='code']:first-child{
margin-left: 0.4em;
}
.export-img .protyle-wysiwyg span[data-type~='code']:last-child{

margin-right: 0.4em;
}
/* 超链接样式 */
.export-img .protyle-wysiwyg a {
color: var(--b3-protyle-inline-link-color);
text-decoration: none;
border-bottom: 1px solid var(--custom-link-bottom-color);
}
Loading

0 comments on commit add0823

Please sign in to comment.