Improve MDHelper themes and packaging

This commit is contained in:
shenw
2026-05-25 22:00:37 +08:00
parent 2d896a618f
commit 0d2f62817b
41 changed files with 3729 additions and 86 deletions
+73 -2
View File
@@ -10,8 +10,8 @@ body {
margin: 0;
background: #f6f7f9;
color: #23272f;
font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
font-size: var(--reader-font-scale);
font-family: var(--reader-font-family);
font-size: var(--reader-font-size);
line-height: 1.72;
}
@@ -122,6 +122,12 @@ html[data-theme="dark"] blockquote {
background: #f0fff6;
}
.admonition-note {
border-color: #cfe0f2;
border-left-color: #3b82c4;
background: #f0f7ff;
}
.admonition-warning,
.admonition-caution {
border-color: #f1d7a8;
@@ -152,6 +158,12 @@ html[data-theme="dark"] .admonition-tip {
background: #1d3026;
}
html[data-theme="dark"] .admonition-note {
border-color: #344e68;
border-left-color: #5aa5e8;
background: #1e2b38;
}
html[data-theme="dark"] .admonition-warning,
html[data-theme="dark"] .admonition-caution {
border-color: #584725;
@@ -402,6 +414,62 @@ html[data-theme="dark"] .plain-file-view {
background: #171b22;
}
.diagram-block,
.math-block {
margin: 1.2em 0;
border: 1px solid #d8dee8;
border-radius: 8px;
overflow: auto;
background: #f7f9fc;
}
html[data-theme="dark"] .diagram-block,
html[data-theme="dark"] .math-block {
border-color: #384252;
background: #171b22;
}
.diagram-title {
padding: 0.42em 0.76em;
border-bottom: 1px solid #d8dee8;
background: #edf1f6;
color: #53606f;
font-size: 0.82em;
font-weight: 650;
}
html[data-theme="dark"] .diagram-title {
border-bottom-color: #384252;
background: #242b36;
color: #b7c0cc;
}
.mermaid,
.math-block {
padding: 1em;
}
.diagram-missing-runtime::before {
content: "Mermaid 本地资源未加载,下面显示原始图表代码。";
display: block;
margin-bottom: 0.75em;
color: #9b2c2c;
font-weight: 650;
}
.diagram-render-error::before {
content: "Mermaid 图表渲染失败,下面显示原始图表代码。";
display: block;
margin-bottom: 0.75em;
color: #9b2c2c;
font-weight: 650;
}
html[data-theme="dark"] .diagram-missing-runtime::before,
html[data-theme="dark"] .diagram-render-error::before {
color: #f2b8b5;
}
.copy-code-button {
position: absolute;
top: 6px;
@@ -555,7 +623,10 @@ html[data-theme="dark"] hr {
left: 50%;
z-index: 1001;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
max-width: min(92vw, 760px);
transform: translateX(-50%);
}