feat: optimize startup and add Windows installer

This commit is contained in:
2026-09-17 14:56:48 +08:00
parent 4113236128
commit a097ce8f4b
36 changed files with 2661 additions and 935 deletions
+14 -193
View File
@@ -38,196 +38,6 @@ html[data-theme="dark"] .reader {
min-height: 100vh;
}
.reader-shell.has-reader-toc {
display: grid;
grid-template-columns: minmax(0, var(--reader-paper-width)) minmax(190px, 240px);
gap: 24px;
justify-content: center;
align-items: start;
padding: 0 24px;
}
.reader-shell.has-reader-toc .reader {
grid-column: 1;
grid-row: 1;
width: 100%;
margin: 0;
}
.reader-toc {
box-sizing: border-box;
grid-column: 2;
grid-row: 1;
position: sticky;
top: 18px;
max-height: calc(100vh - 36px);
margin: 24px 0;
padding: 14px 10px 16px;
overflow: auto;
border: 1px solid #d9dee7;
border-radius: 8px;
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 8px 24px rgba(22, 34, 51, 0.08);
}
.reader-toc__title {
margin: 0 6px 10px;
color: #526071;
font-size: 0.82em;
font-weight: 700;
}
.reader-toc__nav {
display: grid;
gap: 2px;
}
.reader-toc__link {
display: block;
min-height: 24px;
padding: 4px 8px;
border-radius: 6px;
color: #415064;
font-size: 0.86em;
line-height: 1.35;
text-decoration: none;
}
.reader-toc__link:hover {
background: #eef4fb;
text-decoration: none;
}
.reader-toc__link.is-active {
background: #dbeafe;
color: #124a7c;
font-weight: 700;
}
.reader-toc__link--level-2 {
padding-left: 18px;
}
.reader-toc__link--level-3 {
padding-left: 30px;
}
.reader-toc__link--level-4,
.reader-toc__link--level-5,
.reader-toc__link--level-6 {
padding-left: 42px;
}
.reader-progress {
position: fixed;
right: 18px;
bottom: 16px;
z-index: 20;
display: flex;
align-items: center;
gap: 8px;
min-width: 128px;
padding: 7px 9px;
border: 1px solid #d3dbe7;
border-radius: 8px;
background: rgba(255, 255, 255, 0.9);
color: #384557;
box-shadow: 0 8px 22px rgba(22, 34, 51, 0.12);
font-size: 12px;
backdrop-filter: blur(8px);
}
.reader-progress__track {
flex: 1;
height: 5px;
overflow: hidden;
border-radius: 999px;
background: #d9e2ef;
}
.reader-progress__bar {
width: 0%;
height: 100%;
border-radius: inherit;
background: #3577b9;
}
.reader-progress__text {
min-width: 34px;
text-align: right;
font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .reader-toc {
border-color: #3a4352;
background: rgba(32, 36, 44, 0.92);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
html[data-theme="dark"] .reader-toc__title {
color: #aeb8c8;
}
html[data-theme="dark"] .reader-toc__link {
color: #c7d0de;
}
html[data-theme="dark"] .reader-toc__link:hover {
background: #2b3543;
}
html[data-theme="dark"] .reader-toc__link.is-active {
background: #1f4a73;
color: #f2f7ff;
}
html[data-theme="dark"] .reader-progress {
border-color: #3a4352;
background: rgba(32, 36, 44, 0.9);
color: #dce5f3;
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}
html[data-theme="dark"] .reader-progress__track {
background: #3b4656;
}
html[data-theme="dark"] .reader-progress__bar {
background: #6aa9e9;
}
@media (max-width: 1080px) {
.reader-shell.has-reader-toc {
display: block;
padding: 0;
}
.reader-shell.has-reader-toc .reader {
margin: 0 auto;
}
.reader-toc {
grid-column: auto;
grid-row: auto;
position: static;
max-width: var(--reader-paper-width);
max-height: 34vh;
margin: 16px auto 0;
}
}
@media (max-width: 720px) {
.reader-toc {
display: none;
}
.reader-progress {
right: 10px;
bottom: 10px;
min-width: 108px;
}
}
h1,
h2,
h3,
@@ -828,6 +638,20 @@ html[data-theme="dark"] .diagram-title {
padding: 1em;
}
.math-block,
.math-display {
font-size: var(--reader-math-font-size, 1em);
}
.math-block .katex,
.math-display .katex,
.math-inline .katex,
.math-block mjx-container,
.math-display mjx-container,
.math-inline mjx-container {
font-size: 1em !important;
}
.diagram-missing-runtime::before {
content: "Mermaid 本地资源未加载,下面显示原始图表代码。";
display: block;
@@ -1121,6 +945,3 @@ html[data-theme="dark"] hr {
padding: 24px 20px 42px;
}
}