增加了dark模式

main
mula.liu 2026-01-31 11:41:20 +08:00
parent 4a99b10578
commit 836373fa27
17 changed files with 295 additions and 134 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

View File

@ -7,10 +7,11 @@
align-items: center; align-items: center;
margin-bottom: 4px; margin-bottom: 4px;
padding: 16px; padding: 16px;
background: #ffffff; background: var(--card-bg);
border-radius: 8px; border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
width: 100%; width: 100%;
border: 1px solid var(--border-color);
} }
.list-action-bar-left, .list-action-bar-left,
@ -41,31 +42,31 @@
align-items: center; align-items: center;
gap: 12px; gap: 12px;
padding: 8px 16px; padding: 8px 16px;
background: #e6f4ff; background: var(--bg-color-secondary);
border: 1px solid #91caff; border: 1px solid var(--link-color);
border-radius: 6px; border-radius: 6px;
font-size: 14px; font-size: 14px;
} }
.selection-count { .selection-count {
color: rgba(0, 0, 0, 0.85); color: var(--text-color);
} }
.selection-count strong { .selection-count strong {
color: #1677ff; color: var(--link-color);
font-weight: 600; font-weight: 600;
margin: 0 4px; margin: 0 4px;
} }
.all-pages-tag { .all-pages-tag {
color: #1677ff; color: var(--link-color);
font-weight: 500; font-weight: 500;
margin-left: 4px; margin-left: 4px;
} }
.select-all-link, .select-all-link,
.clear-selection-link { .clear-selection-link {
color: #1677ff; color: var(--link-color);
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;

View File

@ -1,21 +1,22 @@
/* 列表表格容器 */ /* 列表表格容器 */
.list-table-container { .list-table-container {
background: #ffffff; background: var(--card-bg);
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
height: 626px; height: 626px;
overflow-y: auto; overflow-y: auto;
width: 100%; width: 100%;
border: 1px solid var(--border-color);
} }
/* 行选中样式 */ /* 行选中样式 */
.list-table-container .row-selected { .list-table-container .row-selected {
background-color: #e6f7ff; background-color: var(--item-hover-bg);
} }
.list-table-container .row-selected:hover > td { .list-table-container .row-selected:hover > td {
background-color: #bae7ff !important; background-color: var(--item-hover-bg) !important;
} }
/* 分页器中的选择信息样式 */ /* 分页器中的选择信息样式 */
@ -26,17 +27,17 @@
} }
.selection-count { .selection-count {
color: rgba(0, 0, 0, 0.65); color: var(--text-color-secondary);
font-size: 14px; font-size: 14px;
} }
.count-highlight { .count-highlight {
color: #1677ff; color: var(--link-color);
font-weight: 600; font-weight: 600;
} }
.selection-action { .selection-action {
color: #1677ff; color: var(--link-color);
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;
@ -45,5 +46,6 @@
} }
.selection-action:hover { .selection-action:hover {
color: #4096ff; color: var(--link-color);
opacity: 0.8;
} }

View File

@ -148,7 +148,7 @@ function AppSider({ collapsed, onToggle }) {
<div style={{ display: 'flex', alignItems: 'center', gap: 12, paddingLeft: 8 }}> <div style={{ display: 'flex', alignItems: 'center', gap: 12, paddingLeft: 8 }}>
<img src="/favicon.svg" alt="logo" style={{ width: 32, height: 32 }} /> <img src="/favicon.svg" alt="logo" style={{ width: 32, height: 32 }} />
{!collapsed && ( {!collapsed && (
<span style={{ fontSize: 18, fontWeight: 'bold', color: '#111' }}>NexDocus</span> <span style={{ fontSize: 18, fontWeight: 'bold', color: 'var(--text-color)' }}>NexDocus</span>
)} )}
</div> </div>
) )

View File

@ -2,7 +2,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
background: #f5f5f5; background: var(--bg-color-secondary);
} }
.pdf-toolbar { .pdf-toolbar {
@ -10,10 +10,11 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 12px 16px; padding: 12px 16px;
background: white; background: var(--card-bg);
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid var(--border-color);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
z-index: 10; z-index: 10;
color: var(--text-color);
} }
.pdf-content { .pdf-content {
@ -23,7 +24,7 @@
} }
.pdf-virtual-list { .pdf-virtual-list {
background: #f5f5f5; background: var(--bg-color-secondary);
} }
.pdf-page-wrapper { .pdf-page-wrapper {
@ -31,7 +32,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 20px; padding: 20px;
background: #f5f5f5; background: var(--bg-color-secondary);
} }
.pdf-page-wrapper canvas { .pdf-page-wrapper canvas {
@ -43,7 +44,7 @@
.pdf-page-number { .pdf-page-number {
margin-top: 8px; margin-top: 8px;
font-size: 13px; font-size: 13px;
color: #000; color: var(--text-color);
font-weight: 600; font-weight: 600;
text-align: center; text-align: center;
} }
@ -55,7 +56,7 @@
justify-content: center; justify-content: center;
min-height: 600px; min-height: 600px;
gap: 8px; gap: 8px;
color: #666; color: var(--text-color-secondary);
font-size: 14px; font-size: 14px;
} }
@ -64,9 +65,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-height: 600px; min-height: 600px;
background: #fafafa; background: var(--item-hover-bg);
border: 1px dashed #d9d9d9; border: 1px dashed var(--border-color);
color: #999; color: var(--text-color-secondary);
font-size: 14px; font-size: 14px;
} }
@ -83,8 +84,8 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
min-height: 400px; min-height: 400px;
background: white; background: var(--card-bg);
border: 1px solid #f0f0f0; border: 1px solid var(--border-color);
border-radius: 4px; border-radius: 4px;
margin: 20px; margin: 20px;
} }
@ -101,6 +102,7 @@
align-items: center; align-items: center;
height: 100%; height: 100%;
min-height: 400px; min-height: 400px;
color: var(--text-color);
} }
.pdf-error { .pdf-error {

View File

@ -8,6 +8,15 @@
--sider-bg: #fff; --sider-bg: #fff;
--item-hover-bg: #f5f5f5; --item-hover-bg: #f5f5f5;
--card-bg: #fff; --card-bg: #fff;
/* Markdown & Editor Specific */
--code-bg: #f6f8fa;
--table-border-color: #dfe2e5;
--table-header-bg: #f6f8fa;
--blockquote-border-color: #dfe2e5;
--blockquote-text-color: #6a737d;
--toolbar-bg: #fafafa;
--link-color: #1677ff;
} }
body.dark { body.dark {
@ -20,6 +29,15 @@ body.dark {
--sider-bg: #141414; --sider-bg: #141414;
--item-hover-bg: #1f1f1f; --item-hover-bg: #1f1f1f;
--card-bg: #1f1f1f; --card-bg: #1f1f1f;
/* Markdown & Editor Specific Dark */
--code-bg: #2d2d2d;
--table-border-color: #303030;
--table-header-bg: #1f1f1f;
--blockquote-border-color: #303030;
--blockquote-text-color: #8b949e;
--toolbar-bg: #1f1f1f;
--link-color: #177ddc;
} }
body { body {
@ -33,4 +51,67 @@ body {
font-weight: bold; font-weight: bold;
padding: 0 2px; padding: 0 2px;
border-radius: 2px; border-radius: 2px;
} }
/* Dark mode overrides for highlight.js */
body.dark .hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #c9d1d9;
background: var(--code-bg) !important;
}
body.dark .hljs-comment,
body.dark .hljs-quote {
color: #8b949e;
}
body.dark .hljs-keyword,
body.dark .hljs-selector-tag {
color: #ff7b72;
}
body.dark .hljs-literal,
body.dark .hljs-number,
body.dark .hljs-variable,
body.dark .hljs-template-variable,
body.dark .hljs-tag .hljs-attr {
color: #79c0ff;
}
body.dark .hljs-string,
body.dark .hljs-doctag {
color: #a5d6ff;
}
body.dark .hljs-title,
body.dark .hljs-section,
body.dark .hljs-selector-id {
color: #d2a8ff;
}
body.dark .hljs-title.class_,
body.dark .hljs-class .hljs-title {
color: #f0883e;
}
body.dark .hljs-type,
body.dark .hljs-built_in,
body.dark .hljs-builtin-name,
body.dark .hljs-symbol,
body.dark .hljs-selector-class,
body.dark .hljs-selector-attr,
body.dark .hljs-selector-pseudo {
color: #79c0ff;
}
body.dark .hljs-addition {
color: #aff5b4;
background-color: #033a16;
}
body.dark .hljs-deletion {
color: #ffdcd7;
background-color: #67060c;
}

View File

@ -2,6 +2,7 @@
height: calc(100vh - 64px); height: calc(100vh - 64px);
/* width: calc(100% + 32px); */ /* width: calc(100% + 32px); */
display: flex; display: flex;
background: var(--bg-color);
} }
.document-editor-container { .document-editor-container {
@ -12,28 +13,29 @@
} }
.document-sider { .document-sider {
border-right: 1px solid #f0f0f0; border-right: 1px solid var(--border-color);
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
flex-shrink: 0; flex-shrink: 0;
background: var(--sider-bg);
} }
.sider-header { .sider-header {
padding: 16px 20px; padding: 16px 20px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-color);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
background: #fff; background: var(--header-bg);
} }
.sider-header h2 { .sider-header h2 {
margin: 0; margin: 0;
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #262626; color: var(--text-color);
line-height: 1.5; line-height: 1.5;
} }
@ -74,19 +76,21 @@
justify-content: center; justify-content: center;
width: 32px; width: 32px;
height: 32px; height: 32px;
color: rgba(0, 0, 0, 0.65); color: var(--text-color-secondary);
} }
.sider-actions .ant-btn:not(.mode-toggle-btn):hover { .sider-actions .ant-btn:not(.mode-toggle-btn):hover {
background: #fff; background: var(--item-hover-bg);
border-color: #d9d9d9; border-color: var(--border-color);
color: #1677ff; color: var(--link-color);
} }
.file-tree { .file-tree {
padding: 8px; padding: 8px;
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
background: var(--sider-bg);
color: var(--text-color);
} }
/* 修复Tree组件文档名过长的显示问题 */ /* 修复Tree组件文档名过长的显示问题 */
@ -136,16 +140,17 @@
margin: -4px -8px; margin: -4px -8px;
border-radius: 4px; border-radius: 4px;
transition: all 0.2s; transition: all 0.2s;
color: var(--text-color);
} }
/* 选中的文件夹样式 */ /* 选中的文件夹样式 */
.file-tree .folder-selected>.ant-menu-submenu-title { .file-tree .folder-selected>.ant-menu-submenu-title {
background-color: #e6f7ff !important; background-color: var(--item-hover-bg) !important;
color: #1890ff !important; color: var(--link-color) !important;
} }
.file-tree .folder-selected>.ant-menu-submenu-title:hover { .file-tree .folder-selected>.ant-menu-submenu-title:hover {
background-color: #bae7ff !important; background-color: var(--item-hover-bg) !important;
} }
.file-tree .ant-menu-item, .file-tree .ant-menu-item,
@ -159,7 +164,7 @@
.document-content { .document-content {
height: 100%; height: 100%;
width: 100%; width: 100%;
background: white; background: var(--bg-color);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
@ -177,11 +182,11 @@
.content-header { .content-header {
padding: 16px 24px; padding: 16px 24px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-color);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: white; background: var(--header-bg);
flex-shrink: 0; flex-shrink: 0;
} }
@ -223,7 +228,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: #999; color: var(--text-color-secondary);
} }
/* ByteMD 编辑器样式覆盖 */ /* ByteMD 编辑器样式覆盖 */
@ -232,21 +237,31 @@
height: 100% !important; height: 100% !important;
display: flex !important; display: flex !important;
flex-direction: column !important; flex-direction: column !important;
border: 1px solid #d9d9d9; border: 1px solid var(--border-color);
border-radius: 2px; border-radius: 2px;
overflow: hidden; overflow: hidden;
max-width: none !important; max-width: none !important;
/* Ensure no max-width constraint */ /* Ensure no max-width constraint */
box-sizing: border-box; box-sizing: border-box;
background-color: var(--bg-color);
color: var(--text-color);
} }
/* 工具栏样式 */ /* 工具栏样式 */
.bytemd-toolbar { .bytemd-toolbar {
flex-shrink: 0; flex-shrink: 0;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid var(--border-color);
background-color: #fafafa; background-color: var(--toolbar-bg);
box-sizing: border-box; box-sizing: border-box;
/* Added for consistent box model */ color: var(--text-color);
}
.bytemd-toolbar-icon {
color: var(--text-color);
}
.bytemd-toolbar-icon:hover {
background-color: var(--item-hover-bg);
} }
/* 编辑和预览区域容器 */ /* 编辑和预览区域容器 */
@ -260,6 +275,7 @@
/* Added for consistent box model */ /* Added for consistent box model */
min-width: 0; min-width: 0;
/* Prevent flex item from overflowing */ /* Prevent flex item from overflowing */
background-color: var(--bg-color);
} }
/* 编辑区域 - 固定50%宽度 */ /* 编辑区域 - 固定50%宽度 */
@ -275,6 +291,8 @@
/* Added for consistent box model */ /* Added for consistent box model */
min-width: 0; min-width: 0;
/* Prevent flex item from overflowing */ /* Prevent flex item from overflowing */
background-color: var(--bg-color);
border-right: 1px solid var(--border-color);
} }
/* 预览区域 - 固定50%宽度 */ /* 预览区域 - 固定50%宽度 */
@ -291,6 +309,8 @@
/* Added for consistent box model */ /* Added for consistent box model */
min-width: 0; min-width: 0;
/* Prevent flex item from overflowing */ /* Prevent flex item from overflowing */
background-color: var(--bg-color);
color: var(--text-color);
} }
/* CodeMirror 容器 */ /* CodeMirror 容器 */
@ -301,6 +321,8 @@
line-height: 1.8; line-height: 1.8;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: var(--bg-color);
color: var(--text-color);
} }
/* CodeMirror 滚动容器 */ /* CodeMirror 滚动容器 */
@ -322,30 +344,33 @@
margin-bottom: 16px; margin-bottom: 16px;
font-weight: 600; font-weight: 600;
line-height: 1.25; line-height: 1.25;
color: var(--text-color);
} }
.bytemd-preview h1 { .bytemd-preview h1 {
font-size: 2em; font-size: 2em;
border-bottom: 1px solid #eaecef; border-bottom: 1px solid var(--border-color);
padding-bottom: 0.3em; padding-bottom: 0.3em;
} }
.bytemd-preview h2 { .bytemd-preview h2 {
font-size: 1.5em; font-size: 1.5em;
border-bottom: 1px solid #eaecef; border-bottom: 1px solid var(--border-color);
padding-bottom: 0.3em; padding-bottom: 0.3em;
} }
.bytemd-preview p { .bytemd-preview p {
margin-bottom: 16px; margin-bottom: 16px;
color: var(--text-color);
} }
.bytemd-preview code { .bytemd-preview code {
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
margin: 0; margin: 0;
font-size: 85%; font-size: 85%;
background-color: rgba(27, 31, 35, 0.05); background-color: var(--code-bg);
border-radius: 3px; border-radius: 3px;
color: var(--text-color);
} }
.bytemd-preview pre { .bytemd-preview pre {
@ -353,7 +378,7 @@
overflow: auto; overflow: auto;
font-size: 85%; font-size: 85%;
line-height: 1.45; line-height: 1.45;
background-color: #f6f8fa; background-color: var(--code-bg);
border-radius: 3px; border-radius: 3px;
margin-bottom: 16px; margin-bottom: 16px;
} }
@ -366,6 +391,7 @@
line-height: inherit; line-height: inherit;
background-color: transparent; background-color: transparent;
border: 0; border: 0;
color: inherit;
} }
.bytemd-preview img { .bytemd-preview img {
@ -382,25 +408,27 @@
.bytemd-preview table th, .bytemd-preview table th,
.bytemd-preview table td { .bytemd-preview table td {
padding: 6px 13px; padding: 6px 13px;
border: 1px solid #dfe2e5; border: 1px solid var(--table-border-color);
color: var(--text-color);
} }
.bytemd-preview table th { .bytemd-preview table th {
font-weight: 600; font-weight: 600;
background-color: #f6f8fa; background-color: var(--table-header-bg);
} }
.bytemd-preview blockquote { .bytemd-preview blockquote {
margin: 0 0 16px; margin: 0 0 16px;
padding: 0 1em; padding: 0 1em;
color: #6a737d; color: var(--blockquote-text-color);
border-left: 0.25em solid #dfe2e5; border-left: 0.25em solid var(--blockquote-border-color);
} }
.bytemd-preview ul, .bytemd-preview ul,
.bytemd-preview ol { .bytemd-preview ol {
padding-left: 2em; padding-left: 2em;
margin-bottom: 16px; margin-bottom: 16px;
color: var(--text-color);
} }
.bytemd-preview li { .bytemd-preview li {
@ -416,4 +444,5 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
max-width: 600px; max-width: 600px;
} color: var(--text-color);
}

View File

@ -1,35 +1,37 @@
.project-docs-page { .project-docs-page {
height: calc(100vh - 64px); height: calc(100vh - 64px);
overflow: hidden; overflow: hidden;
background: var(--bg-color);
} }
.docs-layout { .docs-layout {
height: 100%; height: 100%;
background: #fff; background: var(--bg-color);
} }
.docs-sider { .docs-sider {
border-right: 1px solid #f0f0f0; border-right: 1px solid var(--border-color);
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: var(--sider-bg);
} }
.docs-sider-header { .docs-sider-header {
padding: 16px 20px; padding: 16px 20px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-color);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
background: #fff; background: var(--header-bg);
} }
.docs-sider-header h2 { .docs-sider-header h2 {
margin: 0; margin: 0;
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #262626; color: var(--text-color);
line-height: 1.5; line-height: 1.5;
} }
@ -48,6 +50,7 @@
align-items: center !important; align-items: center !important;
justify-content: center !important; justify-content: center !important;
padding: 4px 15px !important; padding: 4px 15px !important;
color: white !important;
} }
.mode-toggle-btn:hover { .mode-toggle-btn:hover {
@ -62,18 +65,21 @@
justify-content: center; justify-content: center;
width: 32px; width: 32px;
height: 32px; height: 32px;
color: var(--text-color-secondary);
} }
.docs-sider-actions .ant-btn-text:hover { .docs-sider-actions .ant-btn-text:hover {
background: #e6f4ff; background: var(--item-hover-bg);
border-color: #91caff; border-color: var(--border-color);
color: #1677ff; color: var(--link-color);
} }
.docs-menu { .docs-menu {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
border-right: none; border-right: none;
background: var(--sider-bg);
color: var(--text-color);
} }
/* 修复文档名过长的显示问题 */ /* 修复文档名过长的显示问题 */
@ -91,12 +97,12 @@
.docs-content-layout { .docs-content-layout {
position: relative; position: relative;
height: 100%; height: 100%;
background: #fff; background: var(--bg-color);
} }
.docs-toc-sider { .docs-toc-sider {
border-left: 1px solid #f0f0f0; border-left: 1px solid var(--border-color);
background: #fafafa !important; background: var(--bg-color-secondary) !important;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
@ -105,18 +111,18 @@
.toc-header { .toc-header {
padding: 16px; padding: 16px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-color);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #fff; background: var(--header-bg);
} }
.toc-header h3 { .toc-header h3 {
margin: 0; margin: 0;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: var(--text-color);
} }
.toc-content { .toc-content {
@ -138,18 +144,18 @@
.toc-content .ant-anchor-link-title { .toc-content .ant-anchor-link-title {
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.75); color: var(--text-color-secondary);
line-height: 1.5; line-height: 1.5;
white-space: nowrap; white-space: nowrap;
} }
.toc-content .ant-anchor-link-active>.ant-anchor-link-title { .toc-content .ant-anchor-link-active>.ant-anchor-link-title {
color: #1890ff; color: var(--link-color);
font-weight: 500; font-weight: 500;
} }
.toc-empty { .toc-empty {
color: #999; color: var(--text-color-secondary);
text-align: center; text-align: center;
margin-top: 40px; margin-top: 40px;
font-size: 13px; font-size: 13px;
@ -167,7 +173,7 @@
.docs-content { .docs-content {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
background: #fff; background: var(--bg-color);
} }
.docs-content-wrapper { .docs-content-wrapper {
@ -196,7 +202,8 @@
.markdown-body { .markdown-body {
font-size: 16px; font-size: 16px;
line-height: 1.6; line-height: 1.6;
color: #333; color: var(--text-color);
background-color: var(--bg-color);
} }
.markdown-body h1 { .markdown-body h1 {
@ -205,7 +212,8 @@
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;
padding-bottom: 8px; padding-bottom: 8px;
border-bottom: 1px solid #eaecef; border-bottom: 1px solid var(--border-color);
color: var(--text-color);
} }
.markdown-body h2 { .markdown-body h2 {
@ -214,30 +222,38 @@
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;
padding-bottom: 8px; padding-bottom: 8px;
border-bottom: 1px solid #eaecef; border-bottom: 1px solid var(--border-color);
color: var(--text-color);
} }
.markdown-body h3 { .markdown-body h3,
font-size: 20px; .markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
font-weight: 600; font-weight: 600;
margin-top: 20px; margin-top: 20px;
margin-bottom: 12px; margin-bottom: 12px;
color: var(--text-color);
} }
.markdown-body h3 { font-size: 20px; }
.markdown-body p { .markdown-body p {
margin-bottom: 16px; margin-bottom: 16px;
color: var(--text-color);
} }
.markdown-body code { .markdown-body code {
background-color: #f6f8fa; background-color: var(--code-bg);
padding: 2px 6px; padding: 2px 6px;
border-radius: 3px; border-radius: 3px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 14px; font-size: 14px;
color: var(--text-color);
} }
.markdown-body pre { .markdown-body pre {
background-color: #f6f8fa; background-color: var(--code-bg);
padding: 16px; padding: 16px;
border-radius: 6px; border-radius: 6px;
overflow-x: auto; overflow-x: auto;
@ -247,12 +263,13 @@
.markdown-body pre code { .markdown-body pre code {
background-color: transparent; background-color: transparent;
padding: 0; padding: 0;
color: inherit;
} }
.markdown-body blockquote { .markdown-body blockquote {
padding: 0 16px; padding: 0 16px;
border-left: 4px solid #dfe2e5; border-left: 4px solid var(--blockquote-border-color);
color: #6a737d; color: var(--blockquote-text-color);
margin-bottom: 16px; margin-bottom: 16px;
} }
@ -260,16 +277,19 @@
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
margin-bottom: 16px; margin-bottom: 16px;
display: block;
overflow-x: auto;
} }
.markdown-body th, .markdown-body th,
.markdown-body td { .markdown-body td {
border: 1px solid #dfe2e5; border: 1px solid var(--table-border-color);
padding: 8px 13px; padding: 8px 13px;
color: var(--text-color);
} }
.markdown-body th { .markdown-body th {
background-color: #f6f8fa; background-color: var(--table-header-bg);
font-weight: 600; font-weight: 600;
} }
@ -279,7 +299,7 @@
} }
.markdown-body a { .markdown-body a {
color: #1677ff; color: var(--link-color);
text-decoration: none; text-decoration: none;
} }
@ -291,8 +311,9 @@
.markdown-body ol { .markdown-body ol {
margin-bottom: 16px; margin-bottom: 16px;
padding-left: 2em; padding-left: 2em;
color: var(--text-color);
} }
.markdown-body li { .markdown-body li {
margin-bottom: 4px; margin-bottom: 4px;
} }

View File

@ -100,7 +100,7 @@ function NotificationList() {
} }
/> />
<Content style={{ padding: '24px', background: '#fff', margin: '24px', borderRadius: '8px' }}> <Content style={{ padding: '24px', background: 'var(--card-bg)', margin: '24px', borderRadius: '8px', border: '1px solid var(--border-color)' }}>
<Tabs <Tabs
activeKey={activeTab} activeKey={activeTab}
onChange={(key) => { setActiveTab(key); setPage(1); }} onChange={(key) => { setActiveTab(key); setPage(1); }}
@ -110,7 +110,7 @@ function NotificationList() {
label: ( label: (
<Space> <Space>
全部消息 全部消息
{activeTab === 'all' && <Badge count={total} overflowCount={99} style={{ backgroundColor: '#d9d9d9' }} />} {activeTab === 'all' && <Badge count={total} overflowCount={99} style={{ backgroundColor: 'var(--text-color-secondary)' }} />}
</Space> </Space>
) )
}, },
@ -138,24 +138,27 @@ function NotificationList() {
style={{ style={{
cursor: 'pointer', cursor: 'pointer',
padding: '16px', padding: '16px',
borderBottom: '1px solid #f0f0f0', borderBottom: '1px solid var(--border-color)',
background: !item.is_read ? '#f0faff' : 'transparent', background: !item.is_read ? 'var(--item-hover-bg)' : 'transparent',
transition: 'all 0.3s' transition: 'all 0.3s'
}} }}
onClick={() => handleNotificationClick(item)} onClick={() => handleNotificationClick(item)}
> >
<div style={{ display: 'flex', gap: '16px' }}> <div style={{ display: 'flex', gap: '16px' }}>
<Avatar icon={getCategoryIcon(item.category)} /> <Avatar
icon={getCategoryIcon(item.category)}
style={{ background: 'var(--bg-color-secondary)' }}
/>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '8px' }}> <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '8px' }}>
<Text strong={!item.is_read} style={{ fontSize: '16px' }}> <Text strong={!item.is_read} style={{ fontSize: '16px', color: 'var(--text-color)' }}>
{item.title} {item.title}
</Text> </Text>
<Text type="secondary" style={{ fontSize: '12px' }}> <Text type="secondary" style={{ fontSize: '12px', color: 'var(--text-color-secondary)' }}>
{new Date(item.created_at).toLocaleString('zh-CN')} {new Date(item.created_at).toLocaleString('zh-CN')}
</Text> </Text>
</div> </div>
<div style={{ color: '#595959', marginBottom: '8px' }}> <div style={{ color: 'var(--text-color)', opacity: 0.85, marginBottom: '8px' }}>
{item.content} {item.content}
</div> </div>
{!item.is_read && <Tag color="blue">未读</Tag>} {!item.is_read && <Tag color="blue">未读</Tag>}

View File

@ -1,38 +1,39 @@
.preview-page { .preview-page {
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
background: #fff; background: var(--bg-color);
} }
.preview-layout { .preview-layout {
height: 100%; height: 100%;
background: #fff; background: var(--bg-color);
} }
.preview-sider { .preview-sider {
border-right: 1px solid #f0f0f0; border-right: 1px solid var(--border-color);
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: var(--sider-bg);
} }
.preview-sider-header { .preview-sider-header {
padding: 16px; padding: 16px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-color);
} }
.preview-sider-header h2 { .preview-sider-header h2 {
margin: 0 0 8px 0; margin: 0 0 8px 0;
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.88); color: var(--text-color);
} }
.preview-project-desc { .preview-project-desc {
margin: 0; margin: 0;
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.45); color: var(--text-color-secondary);
line-height: 1.5; line-height: 1.5;
} }
@ -40,6 +41,8 @@
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
border-right: none; border-right: none;
background: var(--sider-bg);
color: var(--text-color);
} }
/* 修复文档名过长的显示问题 */ /* 修复文档名过长的显示问题 */
@ -57,12 +60,12 @@
.preview-content-layout { .preview-content-layout {
position: relative; position: relative;
height: 100%; height: 100%;
background: #fff; background: var(--bg-color);
} }
.preview-toc-sider { .preview-toc-sider {
border-left: 1px solid #f0f0f0; border-left: 1px solid var(--border-color);
background: #fafafa !important; background: var(--bg-color-secondary) !important;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
@ -71,18 +74,18 @@
.toc-header { .toc-header {
padding: 16px; padding: 16px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid var(--border-color);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #fff; background: var(--header-bg);
} }
.toc-header h3 { .toc-header h3 {
margin: 0; margin: 0;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: var(--text-color);
} }
.toc-content { .toc-content {
@ -102,18 +105,18 @@
.toc-content .ant-anchor-link-title { .toc-content .ant-anchor-link-title {
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.75); color: var(--text-color-secondary);
line-height: 1.5; line-height: 1.5;
white-space: nowrap; white-space: nowrap;
} }
.toc-content .ant-anchor-link-active > .ant-anchor-link-title { .toc-content .ant-anchor-link-active > .ant-anchor-link-title {
color: #1890ff; color: var(--link-color);
font-weight: 500; font-weight: 500;
} }
.toc-empty { .toc-empty {
color: #999; color: var(--text-color-secondary);
text-align: center; text-align: center;
margin-top: 40px; margin-top: 40px;
font-size: 13px; font-size: 13px;
@ -131,7 +134,7 @@
.preview-content { .preview-content {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
background: #fff; background: var(--bg-color);
} }
.preview-content-wrapper { .preview-content-wrapper {
@ -160,7 +163,8 @@
.markdown-body { .markdown-body {
font-size: 16px; font-size: 16px;
line-height: 1.6; line-height: 1.6;
color: #333; color: var(--text-color);
background-color: var(--bg-color);
} }
.markdown-body h1 { .markdown-body h1 {
@ -169,7 +173,8 @@
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;
padding-bottom: 8px; padding-bottom: 8px;
border-bottom: 1px solid #eaecef; border-bottom: 1px solid var(--border-color);
color: var(--text-color);
} }
.markdown-body h2 { .markdown-body h2 {
@ -178,30 +183,38 @@
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;
padding-bottom: 8px; padding-bottom: 8px;
border-bottom: 1px solid #eaecef; border-bottom: 1px solid var(--border-color);
color: var(--text-color);
} }
.markdown-body h3 { .markdown-body h3,
font-size: 20px; .markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
font-weight: 600; font-weight: 600;
margin-top: 20px; margin-top: 20px;
margin-bottom: 12px; margin-bottom: 12px;
color: var(--text-color);
} }
.markdown-body h3 { font-size: 20px; }
.markdown-body p { .markdown-body p {
margin-bottom: 16px; margin-bottom: 16px;
color: var(--text-color);
} }
.markdown-body code { .markdown-body code {
background-color: #f6f8fa; background-color: var(--code-bg);
padding: 2px 6px; padding: 2px 6px;
border-radius: 3px; border-radius: 3px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 14px; font-size: 14px;
color: var(--text-color);
} }
.markdown-body pre { .markdown-body pre {
background-color: #f6f8fa; background-color: var(--code-bg);
padding: 16px; padding: 16px;
border-radius: 6px; border-radius: 6px;
overflow-x: auto; overflow-x: auto;
@ -211,12 +224,13 @@
.markdown-body pre code { .markdown-body pre code {
background-color: transparent; background-color: transparent;
padding: 0; padding: 0;
color: inherit;
} }
.markdown-body blockquote { .markdown-body blockquote {
padding: 0 16px; padding: 0 16px;
border-left: 4px solid #dfe2e5; border-left: 4px solid var(--blockquote-border-color);
color: #6a737d; color: var(--blockquote-text-color);
margin-bottom: 16px; margin-bottom: 16px;
} }
@ -230,12 +244,13 @@
.markdown-body th, .markdown-body th,
.markdown-body td { .markdown-body td {
border: 1px solid #dfe2e5; border: 1px solid var(--table-border-color);
padding: 8px 13px; padding: 8px 13px;
color: var(--text-color);
} }
.markdown-body th { .markdown-body th {
background-color: #f6f8fa; background-color: var(--table-header-bg);
font-weight: 600; font-weight: 600;
} }
@ -245,7 +260,7 @@
} }
.markdown-body a { .markdown-body a {
color: #1677ff; color: var(--link-color);
text-decoration: none; text-decoration: none;
} }
@ -257,6 +272,7 @@
.markdown-body ol { .markdown-body ol {
margin-bottom: 16px; margin-bottom: 16px;
padding-left: 2em; padding-left: 2em;
color: var(--text-color);
} }
.markdown-body li { .markdown-body li {
@ -350,4 +366,4 @@
.markdown-body code { .markdown-body code {
font-size: 13px; font-size: 13px;
} }
} }

View File

@ -13,6 +13,7 @@
margin: 0; margin: 0;
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
color: var(--text-color);
} }
.project-card { .project-card {
@ -21,6 +22,8 @@
transition: all 0.3s; transition: all 0.3s;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
background: var(--card-bg);
border-color: var(--border-color);
} }
.project-card:hover { .project-card:hover {
@ -53,11 +56,12 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: var(--text-color);
} }
.project-description { .project-description {
font-size: 14px; font-size: 14px;
color: #666; color: var(--text-color-secondary);
margin-bottom: 12px; margin-bottom: 12px;
min-height: 40px; min-height: 40px;
overflow: hidden; overflow: hidden;
@ -69,5 +73,5 @@
.project-meta { .project-meta {
font-size: 12px; font-size: 12px;
color: #999; color: var(--text-color-secondary);
} }

View File

@ -154,7 +154,7 @@ function Permissions() {
return ( return (
<div style={{ padding: '24px' }}> <div style={{ padding: '24px' }}>
<h1 style={{ marginBottom: '24px', fontSize: '24px', fontWeight: 600 }}> <h1 style={{ marginBottom: '24px', fontSize: '24px', fontWeight: 600, color: 'var(--text-color)' }}>
<SafetyOutlined style={{ marginRight: '8px' }} /> <SafetyOutlined style={{ marginRight: '8px' }} />
角色权限管理 角色权限管理
</h1> </h1>
@ -177,7 +177,7 @@ function Permissions() {
} }
> >
{selectedRole ? ( {selectedRole ? (
<div style={{ marginBottom: 16, padding: '12px', background: '#f0f2f5', borderRadius: 4 }}> <div style={{ marginBottom: 16, padding: '12px', background: 'var(--bg-color-secondary)', borderRadius: 4 }}>
<Space> <Space>
<span style={{ fontWeight: 500 }}>当前角色</span> <span style={{ fontWeight: 500 }}>当前角色</span>
<Tag color="blue">{selectedRole.role_name}</Tag> <Tag color="blue">{selectedRole.role_name}</Tag>
@ -189,9 +189,10 @@ function Permissions() {
style={{ style={{
marginBottom: 16, marginBottom: 16,
padding: '12px', padding: '12px',
background: '#fff7e6', background: 'var(--bg-color-secondary)',
borderRadius: 4, borderRadius: 4,
color: '#ad6800', color: 'var(--text-color-secondary)',
border: '1px solid var(--border-color)',
}} }}
> >
请从右侧选择一个角色来查看和编辑权限 请从右侧选择一个角色来查看和编辑权限

View File

@ -315,7 +315,7 @@ function Roles() {
return ( return (
<div style={{ padding: '24px' }}> <div style={{ padding: '24px' }}>
<h1 style={{ marginBottom: '24px', fontSize: '24px', fontWeight: 600 }}>角色管理</h1> <h1 style={{ marginBottom: '24px', fontSize: '24px', fontWeight: 600, color: 'var(--text-color)' }}>角色管理</h1>
{/* 搜索和操作栏 */} {/* 搜索和操作栏 */}
<Card style={{ marginBottom: 16 }}> <Card style={{ marginBottom: 16 }}>

View File

@ -300,7 +300,7 @@ function Users() {
return ( return (
<div style={{ padding: '24px' }}> <div style={{ padding: '24px' }}>
<h1 style={{ marginBottom: '24px', fontSize: '24px', fontWeight: 600 }}>用户管理</h1> <h1 style={{ marginBottom: '24px', fontSize: '24px', fontWeight: 600, color: 'var(--text-color)' }}>用户管理</h1>
{/* 搜索和操作栏 */} {/* 搜索和操作栏 */}
<Card style={{ marginBottom: 16 }}> <Card style={{ marginBottom: 16 }}>
@ -400,8 +400,8 @@ function Users() {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<div style={{ padding: '8px 0', background: '#fff7e6', border: '1px solid #ffd591', borderRadius: 4 }}> <div style={{ padding: '8px 0', background: 'var(--bg-color-secondary)', border: '1px solid var(--border-color)', borderRadius: 4 }}>
<div style={{ padding: '0 12px', fontSize: 12, color: '#ad6800' }}> <div style={{ padding: '0 12px', fontSize: 12, color: 'var(--text-color)' }}>
注意新用户的初始密码将在创建成功后显示请妥善保管 注意新用户的初始密码将在创建成功后显示请妥善保管
</div> </div>
</div> </div>

View File

@ -4,6 +4,7 @@ export default {
"./index.html", "./index.html",
"./src/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}",
], ],
darkMode: 'class',
theme: { theme: {
extend: { extend: {
colors: { colors: {