0.4.0 convex及界面修改
This commit is contained in:
@@ -207,52 +207,72 @@ body {
|
||||
.wolai-editor .bn-block-group:hover .bn-drag-handle {
|
||||
opacity: 1;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] {
|
||||
.wolai-editor.wolai-heading-numbering {
|
||||
counter-reset: wolai-h1 wolai-h2 wolai-h3 wolai-h4 wolai-h5;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h1 {
|
||||
|
||||
/* 说明:BlockNote 的 heading 主要由 .bn-block-content[data-content-type=heading] 承载。
|
||||
为避免不同渲染结构导致“标题编号”失效,这里以块级容器为准实现编号。 */
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"]:not([data-level]),
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="1"] {
|
||||
counter-increment: wolai-h1;
|
||||
counter-reset: wolai-h2;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h1::before {
|
||||
content: counter(wolai-h1) ". ";
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"]:not([data-level])::before,
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="1"]::before {
|
||||
content: counter(wolai-h1) ". " !important;
|
||||
color: #94a3b8;
|
||||
margin-right: 8px;
|
||||
margin-right: 8px !important;
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h2 {
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="2"] {
|
||||
counter-increment: wolai-h2;
|
||||
counter-reset: wolai-h3;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h2::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) ". ";
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="2"]::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) ". " !important;
|
||||
color: #94a3b8;
|
||||
margin-right: 6px;
|
||||
margin-right: 6px !important;
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h3 {
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="3"] {
|
||||
counter-increment: wolai-h3;
|
||||
counter-reset: wolai-h4;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h3::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) ". ";
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="3"]::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) ". " !important;
|
||||
color: #cbd5f5;
|
||||
margin-right: 4px;
|
||||
margin-right: 4px !important;
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h4 {
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="4"] {
|
||||
counter-increment: wolai-h4;
|
||||
counter-reset: wolai-h5;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h4::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) "." counter(wolai-h4) ". ";
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="4"]::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) "." counter(wolai-h4) ". " !important;
|
||||
color: #d0d7e7;
|
||||
margin-right: 4px;
|
||||
margin-right: 4px !important;
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h5 {
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="5"] {
|
||||
counter-increment: wolai-h5;
|
||||
}
|
||||
.wolai-editor[data-heading-numbering="true"] h5::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) "." counter(wolai-h4) "." counter(wolai-h5) ". ";
|
||||
.wolai-editor.wolai-heading-numbering .bn-block-content[data-content-type="heading"][data-level="5"]::before {
|
||||
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) "." counter(wolai-h4) "." counter(wolai-h5) ". " !important;
|
||||
color: #d4d4d8;
|
||||
margin-right: 4px;
|
||||
margin-right: 4px !important;
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.wolai-editor-show-structure .bn-block-outer {
|
||||
outline: 1px dashed #d4d4d8;
|
||||
@@ -587,6 +607,105 @@ body {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 页面选项:小字体(覆盖 BlockNote 的 .bn-default-styles 默认字号) */
|
||||
.wolai-small-text .wolai-editor.bn-default-styles,
|
||||
.wolai-small-text .wolai-editor .bn-default-styles {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* 自定义页面:字体 */
|
||||
.wolai-page-font-song {
|
||||
font-family: "宋体", SimSun, "Songti SC", serif;
|
||||
}
|
||||
|
||||
.wolai-page-font-song .wolai-editor.bn-default-styles,
|
||||
.wolai-page-font-song .wolai-editor .bn-default-styles {
|
||||
font-family: "宋体", SimSun, "Songti SC", serif;
|
||||
}
|
||||
|
||||
.wolai-page-font-kai {
|
||||
font-family: "楷体", "楷体_GB2312", SimKai, STKaiti, serif;
|
||||
}
|
||||
|
||||
.wolai-page-font-kai .wolai-editor.bn-default-styles,
|
||||
.wolai-page-font-kai .wolai-editor .bn-default-styles {
|
||||
font-family: "楷体", "楷体_GB2312", SimKai, STKaiti, serif;
|
||||
}
|
||||
|
||||
/* 自定义页面:布局密度(紧凑/默认/宽容) */
|
||||
.wolai-page-density-compact .wolai-editor .bn-block-content {
|
||||
line-height: 1.45;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.wolai-page-density-spacious .wolai-editor .bn-block-content {
|
||||
line-height: 1.75;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
/* 页面选项:小字体(强制覆盖 BlockNote 默认字号) */
|
||||
.wolai-small-text .wolai-editor.bn-default-styles,
|
||||
.wolai-small-text .wolai-editor .bn-default-styles,
|
||||
.wolai-editor.wolai-small-text.bn-default-styles,
|
||||
.wolai-editor.wolai-small-text .bn-default-styles {
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
/* 自定义页面:字体(强制覆盖 BlockNote 默认字体) */
|
||||
.wolai-page-font-song .wolai-editor.bn-default-styles,
|
||||
.wolai-page-font-song .wolai-editor .bn-default-styles,
|
||||
.wolai-editor.wolai-page-font-song.bn-default-styles,
|
||||
.wolai-editor.wolai-page-font-song .bn-default-styles {
|
||||
font-family: "宋体", SimSun, "Songti SC", serif !important;
|
||||
}
|
||||
|
||||
.wolai-page-font-kai .wolai-editor.bn-default-styles,
|
||||
.wolai-page-font-kai .wolai-editor .bn-default-styles,
|
||||
.wolai-editor.wolai-page-font-kai.bn-default-styles,
|
||||
.wolai-editor.wolai-page-font-kai .bn-default-styles {
|
||||
font-family: "楷体", "楷体_GB2312", SimKai, STKaiti, serif !important;
|
||||
}
|
||||
|
||||
/* 自定义页面:布局密度(强制覆盖 BlockNote 默认行高/间距) */
|
||||
.wolai-page-density-compact .wolai-editor .bn-block-content,
|
||||
.wolai-editor.wolai-page-density-compact .bn-block-content {
|
||||
line-height: 1.45 !important;
|
||||
padding-top: 1px !important;
|
||||
padding-bottom: 1px !important;
|
||||
}
|
||||
|
||||
.wolai-page-density-spacious .wolai-editor .bn-block-content,
|
||||
.wolai-editor.wolai-page-density-spacious .bn-block-content {
|
||||
line-height: 1.75 !important;
|
||||
padding-top: 6px !important;
|
||||
padding-bottom: 6px !important;
|
||||
}
|
||||
|
||||
.wolai-page-density-compact .wolai-editor h1 {
|
||||
margin-top: 1.2em;
|
||||
}
|
||||
|
||||
.wolai-page-density-spacious .wolai-editor h1 {
|
||||
margin-top: 1.8em;
|
||||
}
|
||||
|
||||
.wolai-page-density-compact .wolai-editor h2,
|
||||
.wolai-page-density-compact .wolai-editor h3 {
|
||||
margin-top: 1.1em;
|
||||
}
|
||||
|
||||
.wolai-page-density-spacious .wolai-editor h2,
|
||||
.wolai-page-density-spacious .wolai-editor h3 {
|
||||
margin-top: 1.6em;
|
||||
}
|
||||
|
||||
/* 自定义页面:隐藏子页面(仅隐藏通过 /ym 创建的子页面块) */
|
||||
.wolai-hide-child-pages [data-child-page="true"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 标题样式 */
|
||||
.wolai-editor h1 {
|
||||
font-size: 30px;
|
||||
|
||||
Reference in New Issue
Block a user