Add emoji + rich Markdown dual preview, MarkText-style tables, local/S3 images, settings UI, Electron 44, and update README. Co-authored-by: Cursor <cursoragent@cursor.com>
1125 lines
20 KiB
SCSS
1125 lines
20 KiB
SCSS
:global(html),
|
|
:global(body),
|
|
:global(#root) {
|
|
height: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
:global(body) {
|
|
background:
|
|
radial-gradient(1200px 600px at 10% -10%, rgba(13, 148, 136, 0.12), transparent 55%),
|
|
radial-gradient(900px 500px at 100% 0%, rgba(15, 118, 110, 0.08), transparent 50%),
|
|
linear-gradient(180deg, #eef2f4 0%, #e7ecef 100%);
|
|
color: #1a2330;
|
|
font-family:
|
|
'Segoe UI',
|
|
'PingFang SC',
|
|
'Noto Sans SC',
|
|
'Microsoft YaHei',
|
|
sans-serif;
|
|
overflow: hidden;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
:global(p) {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
:global(a) {
|
|
color: #0f766e;
|
|
}
|
|
|
|
.app {
|
|
--accent: #0d9488;
|
|
--accent-deep: #0f766e;
|
|
--ink: #1a2330;
|
|
--muted: #5b6b7c;
|
|
--line: rgba(26, 35, 48, 0.1);
|
|
--panel: rgba(255, 255, 255, 0.78);
|
|
--panel-solid: #fbfcfd;
|
|
--preview-paper: #f4f7f8;
|
|
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
min-height: 100vh;
|
|
padding: 18px 20px 16px;
|
|
gap: 12px;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
flex-shrink: 0;
|
|
flex-wrap: nowrap;
|
|
animation: riseIn 420ms ease both;
|
|
}
|
|
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: 0;
|
|
flex: 0 1 auto;
|
|
}
|
|
|
|
.brandText {
|
|
min-width: 0;
|
|
}
|
|
|
|
.brandMark {
|
|
width: 42px;
|
|
height: 42px;
|
|
border-radius: 12px;
|
|
display: grid;
|
|
place-items: center;
|
|
color: #ecfeff;
|
|
font-size: 18px;
|
|
background: linear-gradient(145deg, #14b8a6 0%, #0f766e 100%);
|
|
box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
|
|
}
|
|
|
|
.title {
|
|
margin: 0;
|
|
font-size: 22px;
|
|
line-height: 1.2;
|
|
letter-spacing: 0.02em;
|
|
font-weight: 700;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.subtitle {
|
|
margin: 4px 0 0;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
letter-spacing: 0.01em;
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: nowrap;
|
|
flex-shrink: 0;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.copyGroup {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-left: 4px;
|
|
padding-left: 10px;
|
|
border-left: 1px solid var(--line);
|
|
}
|
|
|
|
.copyArticleBtn {
|
|
background: #fff !important;
|
|
border-color: rgba(13, 148, 136, 0.45) !important;
|
|
color: var(--accent-deep) !important;
|
|
font-weight: 600;
|
|
|
|
&:hover:not(:disabled) {
|
|
border-color: var(--accent) !important;
|
|
color: var(--accent) !important;
|
|
}
|
|
}
|
|
|
|
.themeSwitch {
|
|
background: rgba(255, 255, 255, 0.7) !important;
|
|
}
|
|
|
|
.themeMenuItem {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
max-width: 260px;
|
|
padding: 2px 0;
|
|
|
|
strong {
|
|
font-size: 13px;
|
|
color: var(--ink, #1a2330);
|
|
}
|
|
|
|
span {
|
|
font-size: 12px;
|
|
color: var(--muted, #5b6b7c);
|
|
line-height: 1.4;
|
|
white-space: normal;
|
|
}
|
|
}
|
|
|
|
.footerToggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 10px;
|
|
border-radius: 999px;
|
|
background: rgba(255, 255, 255, 0.65);
|
|
border: 1px solid var(--line);
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
flex-shrink: 0;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
}
|
|
|
|
.footerPanel {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
padding: 12px 14px;
|
|
border-radius: 14px;
|
|
background: var(--panel);
|
|
border: 1px solid rgba(255, 255, 255, 0.7);
|
|
box-shadow: 0 8px 24px rgba(26, 35, 48, 0.06);
|
|
animation: riseIn 600ms ease both;
|
|
transition: opacity 180ms ease;
|
|
}
|
|
|
|
.footerPanelOff {
|
|
opacity: 0.72;
|
|
}
|
|
|
|
.footerPanelHead {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.footerHint {
|
|
margin: 0;
|
|
flex: 1;
|
|
min-width: 160px;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.footerEditor {
|
|
font-family:
|
|
'Cascadia Code',
|
|
'JetBrains Mono',
|
|
Consolas,
|
|
'Microsoft YaHei',
|
|
monospace !important;
|
|
font-size: 13px !important;
|
|
line-height: 1.55 !important;
|
|
background: rgba(255, 255, 255, 0.85) !important;
|
|
}
|
|
|
|
.snippetBar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
flex-shrink: 0;
|
|
animation: riseIn 480ms ease both;
|
|
}
|
|
|
|
.snippetLabel {
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
margin-right: 2px;
|
|
}
|
|
|
|
.snippetBtn {
|
|
appearance: none;
|
|
border: 1px solid var(--line);
|
|
background: rgba(255, 255, 255, 0.7);
|
|
color: var(--ink);
|
|
border-radius: 999px;
|
|
padding: 4px 12px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition:
|
|
background 160ms ease,
|
|
border-color 160ms ease,
|
|
transform 160ms ease,
|
|
opacity 160ms ease;
|
|
|
|
&:hover:not(:disabled) {
|
|
background: #fff;
|
|
border-color: rgba(13, 148, 136, 0.45);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
&:active:not(:disabled) {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
&:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
}
|
|
|
|
.snippetBarPlain {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.saveHint {
|
|
margin-left: auto;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
transition: color 200ms ease;
|
|
}
|
|
|
|
.workspace {
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.12fr);
|
|
gap: 12px;
|
|
animation: riseIn 560ms ease both;
|
|
}
|
|
|
|
.pane {
|
|
min-width: 0;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--panel);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.7);
|
|
border-radius: 16px;
|
|
box-shadow: 0 12px 40px rgba(26, 35, 48, 0.08);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.previewPane {
|
|
background: var(--panel-solid);
|
|
}
|
|
|
|
.articlePane {
|
|
background: #fff;
|
|
}
|
|
|
|
.paneHeader {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 12px 10px 16px;
|
|
border-bottom: 1px solid var(--line);
|
|
flex-shrink: 0;
|
|
gap: 10px;
|
|
}
|
|
|
|
.paneHeaderLeft,
|
|
.paneHeaderRight {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.paneHeaderActions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.paneThemeBtn {
|
|
background: rgba(255, 255, 255, 0.88) !important;
|
|
border-color: var(--line) !important;
|
|
color: var(--ink) !important;
|
|
font-size: 12px !important;
|
|
height: 28px !important;
|
|
padding: 0 10px !important;
|
|
}
|
|
|
|
.paneTitle {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.02em;
|
|
color: var(--accent-deep);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.paneMeta {
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.tocToggle {
|
|
appearance: none;
|
|
border: 1px solid var(--line);
|
|
background: rgba(255, 255, 255, 0.75);
|
|
color: var(--muted);
|
|
border-radius: 999px;
|
|
padding: 2px 10px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
color: var(--accent-deep);
|
|
border-color: rgba(13, 148, 136, 0.4);
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
}
|
|
|
|
.editorPane {
|
|
min-width: 0;
|
|
}
|
|
|
|
.editorBody {
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
}
|
|
|
|
.tocPanel {
|
|
width: 168px;
|
|
flex-shrink: 0;
|
|
border-right: 1px solid var(--line);
|
|
background: rgba(247, 250, 251, 0.95);
|
|
overflow: auto;
|
|
padding: 10px 8px 12px;
|
|
}
|
|
|
|
.tocTitle {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.04em;
|
|
color: var(--muted);
|
|
padding: 0 6px 8px;
|
|
}
|
|
|
|
.tocEmpty {
|
|
margin: 0;
|
|
padding: 6px;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.tocList {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.tocItem {
|
|
appearance: none;
|
|
width: 100%;
|
|
border: none;
|
|
background: transparent;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
color: var(--ink);
|
|
font-size: 12px;
|
|
line-height: 1.4;
|
|
padding: 6px 8px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 6px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
|
|
&:hover {
|
|
background: rgba(13, 148, 136, 0.1);
|
|
}
|
|
}
|
|
|
|
.tocItemActive {
|
|
background: rgba(13, 148, 136, 0.14);
|
|
color: var(--accent-deep);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tocLevel {
|
|
flex-shrink: 0;
|
|
font-size: 10px;
|
|
color: var(--muted);
|
|
margin-top: 1px;
|
|
}
|
|
|
|
.editorWrap {
|
|
flex: 1;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
}
|
|
|
|
.editorWrapDragOver {
|
|
outline: 2px dashed rgba(13, 148, 136, 0.55);
|
|
outline-offset: -2px;
|
|
background: rgba(13, 148, 136, 0.04);
|
|
}
|
|
|
|
.editorWrapBusy {
|
|
opacity: 0.92;
|
|
}
|
|
|
|
.dropOverlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 2;
|
|
display: grid;
|
|
place-items: center;
|
|
pointer-events: none;
|
|
background: rgba(13, 148, 136, 0.08);
|
|
color: var(--accent-deep);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.editorMarkdown .editor {
|
|
font-family:
|
|
'Cascadia Code',
|
|
'JetBrains Mono',
|
|
'SF Mono',
|
|
Consolas,
|
|
'Microsoft YaHei',
|
|
monospace !important;
|
|
}
|
|
|
|
.editorPlain .editor {
|
|
font-family:
|
|
'Segoe UI',
|
|
'PingFang SC',
|
|
'Microsoft YaHei',
|
|
sans-serif !important;
|
|
font-size: 15px !important;
|
|
line-height: 1.8 !important;
|
|
}
|
|
|
|
.editor {
|
|
flex: 1 !important;
|
|
min-height: 0 !important;
|
|
height: 100% !important;
|
|
overflow: auto !important;
|
|
resize: none !important;
|
|
border: none !important;
|
|
border-radius: 0 !important;
|
|
box-shadow: none !important;
|
|
background: transparent !important;
|
|
padding: 16px 18px !important;
|
|
font-size: 14px !important;
|
|
line-height: 1.7 !important;
|
|
|
|
&:focus {
|
|
box-shadow: none !important;
|
|
}
|
|
}
|
|
|
|
.previewScroll {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
background:
|
|
linear-gradient(180deg, rgba(244, 247, 248, 0.95), rgba(244, 247, 248, 1)),
|
|
repeating-linear-gradient(
|
|
0deg,
|
|
transparent,
|
|
transparent 27px,
|
|
rgba(13, 148, 136, 0.04) 28px
|
|
);
|
|
}
|
|
|
|
.previewHtml {
|
|
padding: 18px 20px 28px;
|
|
font-size: 15px;
|
|
line-height: 1.75;
|
|
color: var(--ink);
|
|
user-select: text;
|
|
animation: fadeIn 220ms ease;
|
|
|
|
> :global(div) {
|
|
margin: 0 0 0.65em;
|
|
}
|
|
|
|
> :global(div:last-child) {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
:global(img) {
|
|
max-width: 100%;
|
|
height: auto;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
:global(.emoji-footer) {
|
|
margin-top: 16px;
|
|
padding-top: 4px;
|
|
color: var(--ink);
|
|
line-height: 1.7;
|
|
}
|
|
|
|
:global(.emoji-table) {
|
|
margin: 8px 0 12px;
|
|
line-height: 1.45;
|
|
}
|
|
|
|
:global(.emoji-table pre) {
|
|
margin: 0;
|
|
padding: 10px 12px;
|
|
white-space: pre;
|
|
overflow-x: auto;
|
|
/* Fullwidth grid does not need dual-width mono; any CJK font works */
|
|
font-family:
|
|
'Microsoft YaHei',
|
|
'PingFang SC',
|
|
'Noto Sans SC',
|
|
'Segoe UI',
|
|
sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.55;
|
|
letter-spacing: 0;
|
|
font-variant-ligatures: none;
|
|
background: rgba(26, 35, 48, 0.04);
|
|
border: 1px dashed rgba(26, 35, 48, 0.18);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
:global(.emoji-code) {
|
|
margin: 8px 0 12px;
|
|
padding: 10px 12px;
|
|
border: 1px solid rgba(26, 35, 48, 0.16);
|
|
border-radius: 8px;
|
|
background: rgba(26, 35, 48, 0.04);
|
|
font-size: 13px;
|
|
}
|
|
|
|
:global(.emoji-code pre) {
|
|
margin: 8px 0 0;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
font-family:
|
|
'Cascadia Code',
|
|
'JetBrains Mono',
|
|
Consolas,
|
|
monospace;
|
|
line-height: 1.55;
|
|
}
|
|
}
|
|
|
|
.articleScroll {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
background:
|
|
radial-gradient(ellipse 80% 40% at 50% 0%, rgba(13, 148, 136, 0.05), transparent 70%),
|
|
linear-gradient(180deg, #fcfdfd 0%, #f7fafb 100%);
|
|
transition: background 220ms ease;
|
|
}
|
|
|
|
.articlePane[data-theme='B'] .articleScroll {
|
|
background:
|
|
radial-gradient(ellipse 70% 36% at 50% 0%, rgba(14, 116, 144, 0.06), transparent 70%),
|
|
linear-gradient(180deg, #fbfdfe 0%, #f3f8fa 100%);
|
|
}
|
|
|
|
.articlePane[data-theme='C'] .articleScroll {
|
|
background: #ffffff;
|
|
}
|
|
|
|
.articlePane[data-theme='D'] .articleScroll {
|
|
background:
|
|
radial-gradient(ellipse 80% 42% at 50% 0%, rgba(180, 83, 9, 0.06), transparent 68%),
|
|
linear-gradient(180deg, #fffdf9 0%, #faf6f0 100%);
|
|
}
|
|
|
|
.articleHtml {
|
|
--md-ink: #1c2430;
|
|
--md-muted: #64748b;
|
|
--md-accent: #0f766e;
|
|
--md-border: rgba(28, 36, 48, 0.1);
|
|
--md-code-bg: #f1f5f7;
|
|
--md-quote-bg: rgba(13, 148, 136, 0.06);
|
|
--md-h1-rule: rgba(15, 118, 110, 0.22);
|
|
--md-pre-bg: #1a2330;
|
|
--md-code-fg: #0f4c46;
|
|
|
|
max-width: 42rem;
|
|
margin: 0 auto;
|
|
padding: 28px 28px 40px;
|
|
color: var(--md-ink);
|
|
font-family:
|
|
'Source Han Sans SC',
|
|
'Noto Sans SC',
|
|
'PingFang SC',
|
|
'Segoe UI',
|
|
'Microsoft YaHei',
|
|
sans-serif;
|
|
font-size: 15.5px;
|
|
line-height: 1.85;
|
|
letter-spacing: 0.01em;
|
|
word-break: break-word;
|
|
user-select: text;
|
|
animation: fadeIn 220ms ease;
|
|
|
|
&[data-theme='B'] {
|
|
--md-accent: #0e7490;
|
|
--md-quote-bg: rgba(14, 116, 144, 0.06);
|
|
--md-h1-rule: rgba(14, 116, 144, 0.28);
|
|
--md-code-bg: #eef6f9;
|
|
--md-code-fg: #0c4a5c;
|
|
font-size: 15px;
|
|
line-height: 1.8;
|
|
}
|
|
|
|
&[data-theme='C'] {
|
|
--md-accent: #475569;
|
|
--md-muted: #94a3b8;
|
|
--md-quote-bg: #f8fafc;
|
|
--md-h1-rule: transparent;
|
|
--md-code-bg: #f1f5f9;
|
|
--md-code-fg: #334155;
|
|
--md-border: rgba(15, 23, 42, 0.08);
|
|
font-size: 15px;
|
|
line-height: 1.78;
|
|
max-width: 38rem;
|
|
}
|
|
|
|
&[data-theme='D'] {
|
|
--md-ink: #1c1917;
|
|
--md-muted: #78716c;
|
|
--md-accent: #b45309;
|
|
--md-quote-bg: rgba(180, 83, 9, 0.07);
|
|
--md-h1-rule: rgba(180, 83, 9, 0.35);
|
|
--md-code-bg: #faf5f0;
|
|
--md-code-fg: #7c2d12;
|
|
--md-border: rgba(28, 25, 23, 0.12);
|
|
--md-pre-bg: #1c1917;
|
|
font-size: 16px;
|
|
line-height: 1.9;
|
|
}
|
|
|
|
:global(h1),
|
|
:global(h2),
|
|
:global(h3),
|
|
:global(h4),
|
|
:global(h5),
|
|
:global(h6) {
|
|
color: var(--md-ink);
|
|
font-weight: 700;
|
|
line-height: 1.35;
|
|
letter-spacing: -0.01em;
|
|
margin: 1.55em 0 0.55em;
|
|
}
|
|
|
|
:global(h1) {
|
|
font-size: 1.85em;
|
|
margin-top: 0.2em;
|
|
padding-bottom: 0.35em;
|
|
border-bottom: 2px solid var(--md-h1-rule);
|
|
}
|
|
|
|
:global(h2) {
|
|
font-size: 1.4em;
|
|
padding-bottom: 0.28em;
|
|
border-bottom: 1px solid var(--md-border);
|
|
}
|
|
|
|
:global(h3) {
|
|
font-size: 1.18em;
|
|
color: #243044;
|
|
}
|
|
|
|
:global(h4) {
|
|
font-size: 1.05em;
|
|
}
|
|
|
|
:global(h5),
|
|
:global(h6) {
|
|
font-size: 0.95em;
|
|
color: var(--md-muted);
|
|
text-transform: none;
|
|
}
|
|
|
|
:global(p) {
|
|
margin: 0 0 1em;
|
|
}
|
|
|
|
:global(a) {
|
|
color: var(--md-accent);
|
|
text-decoration: underline;
|
|
text-decoration-thickness: 1px;
|
|
text-underline-offset: 3px;
|
|
transition: color 140ms ease;
|
|
|
|
&:hover {
|
|
filter: brightness(1.12);
|
|
}
|
|
}
|
|
|
|
:global(strong) {
|
|
font-weight: 700;
|
|
color: #152033;
|
|
}
|
|
|
|
:global(em) {
|
|
font-style: italic;
|
|
color: #334155;
|
|
}
|
|
|
|
:global(ul),
|
|
:global(ol) {
|
|
margin: 0 0 1em;
|
|
padding-left: 1.45em;
|
|
}
|
|
|
|
:global(li) {
|
|
margin: 0.28em 0;
|
|
}
|
|
|
|
:global(li > p) {
|
|
margin: 0.2em 0;
|
|
}
|
|
|
|
:global(li > ul),
|
|
:global(li > ol) {
|
|
margin: 0.25em 0 0.35em;
|
|
}
|
|
|
|
:global(blockquote) {
|
|
margin: 0 0 1.1em;
|
|
padding: 0.65em 1em 0.65em 1.05em;
|
|
border-left: 3.5px solid var(--md-accent);
|
|
background: var(--md-quote-bg);
|
|
border-radius: 0 10px 10px 0;
|
|
color: #3d4f63;
|
|
|
|
:global(p) {
|
|
margin: 0.35em 0;
|
|
}
|
|
|
|
:global(p:first-child) {
|
|
margin-top: 0;
|
|
}
|
|
|
|
:global(p:last-child) {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
:global(hr) {
|
|
border: none;
|
|
height: 1px;
|
|
margin: 1.6em 0;
|
|
background: linear-gradient(
|
|
90deg,
|
|
transparent,
|
|
var(--md-accent),
|
|
transparent
|
|
);
|
|
opacity: 0.45;
|
|
}
|
|
|
|
:global(code) {
|
|
font-family:
|
|
'Cascadia Code',
|
|
'JetBrains Mono',
|
|
'SF Mono',
|
|
Consolas,
|
|
monospace;
|
|
font-size: 0.88em;
|
|
padding: 0.15em 0.4em;
|
|
border-radius: 5px;
|
|
background: var(--md-code-bg);
|
|
color: var(--md-code-fg);
|
|
border: 1px solid color-mix(in srgb, var(--md-accent) 18%, transparent);
|
|
}
|
|
|
|
:global(pre) {
|
|
margin: 0 0 1.15em;
|
|
padding: 14px 16px;
|
|
overflow-x: auto;
|
|
border-radius: 12px;
|
|
background: var(--md-pre-bg);
|
|
border: 1px solid rgba(26, 35, 48, 0.85);
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
|
|
|
:global(code) {
|
|
display: block;
|
|
padding: 0;
|
|
border: none;
|
|
background: transparent;
|
|
color: #e2e8f0;
|
|
font-size: 0.86em;
|
|
line-height: 1.65;
|
|
white-space: pre;
|
|
}
|
|
}
|
|
|
|
:global(img) {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
margin: 1em auto;
|
|
border-radius: 10px;
|
|
box-shadow: 0 8px 28px rgba(26, 35, 48, 0.1);
|
|
}
|
|
|
|
:global(table) {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 0 0 1.2em;
|
|
font-size: 0.94em;
|
|
overflow: hidden;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--md-border);
|
|
}
|
|
|
|
:global(th),
|
|
:global(td) {
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--md-border);
|
|
text-align: left;
|
|
vertical-align: top;
|
|
}
|
|
|
|
:global(th) {
|
|
background: color-mix(in srgb, var(--md-accent) 12%, transparent);
|
|
font-weight: 600;
|
|
color: var(--md-accent);
|
|
}
|
|
|
|
:global(tr:last-child td) {
|
|
border-bottom: none;
|
|
}
|
|
|
|
:global(tr:nth-child(even) td) {
|
|
background: rgba(244, 247, 248, 0.65);
|
|
}
|
|
|
|
:global(input[type='checkbox']) {
|
|
margin-right: 0.45em;
|
|
accent-color: var(--md-accent);
|
|
}
|
|
|
|
:global(.md-footer) {
|
|
margin-top: 2em;
|
|
padding-top: 1.1em;
|
|
border-top: 1px dashed var(--md-border);
|
|
color: var(--md-muted);
|
|
font-size: 0.9em;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
/* B · 青简:书签感左侧强调 */
|
|
&[data-theme='B'] {
|
|
:global(h1) {
|
|
border-bottom: none;
|
|
padding-left: 0.7em;
|
|
border-left: 4px solid var(--md-accent);
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
:global(h2) {
|
|
border-bottom: none;
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
:global(blockquote) {
|
|
border-radius: 0;
|
|
border-left-width: 3px;
|
|
}
|
|
|
|
:global(pre) {
|
|
border-radius: 8px;
|
|
}
|
|
|
|
:global(table) {
|
|
border-radius: 6px;
|
|
}
|
|
}
|
|
|
|
/* C · 精简:少装饰 */
|
|
&[data-theme='C'] {
|
|
:global(h1),
|
|
:global(h2) {
|
|
border-bottom: none;
|
|
padding-bottom: 0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
:global(h1) {
|
|
font-size: 1.65em;
|
|
}
|
|
|
|
:global(h2) {
|
|
font-size: 1.28em;
|
|
}
|
|
|
|
:global(blockquote) {
|
|
background: transparent;
|
|
border-left-width: 2px;
|
|
border-radius: 0;
|
|
padding-left: 0.85em;
|
|
}
|
|
|
|
:global(pre) {
|
|
border-radius: 6px;
|
|
box-shadow: none;
|
|
}
|
|
|
|
:global(img) {
|
|
border-radius: 4px;
|
|
box-shadow: none;
|
|
}
|
|
|
|
:global(table) {
|
|
border-radius: 0;
|
|
}
|
|
|
|
:global(th) {
|
|
background: transparent;
|
|
border-bottom: 2px solid var(--md-border);
|
|
}
|
|
|
|
:global(tr:nth-child(even) td) {
|
|
background: transparent;
|
|
}
|
|
|
|
:global(a) {
|
|
text-decoration-thickness: 1px;
|
|
}
|
|
}
|
|
|
|
/* D · 聚焦:双线标题 + 要点感 */
|
|
&[data-theme='D'] {
|
|
:global(h1) {
|
|
border-bottom-width: 3px;
|
|
border-bottom-style: double;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
:global(h2) {
|
|
border-bottom: none;
|
|
padding-left: 0.55em;
|
|
border-left: 3px solid var(--md-accent);
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
:global(h3) {
|
|
color: var(--md-accent);
|
|
}
|
|
|
|
:global(blockquote) {
|
|
border-left-width: 4px;
|
|
border-radius: 0 12px 12px 0;
|
|
}
|
|
|
|
:global(strong) {
|
|
color: #1c1917;
|
|
background: rgba(180, 83, 9, 0.1);
|
|
padding: 0 0.2em;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
:global(ul) {
|
|
list-style: none;
|
|
padding-left: 1.1em;
|
|
|
|
:global(li::before) {
|
|
content: '→ ';
|
|
color: var(--md-accent);
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.emptyState {
|
|
height: 100%;
|
|
min-height: 240px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
padding: 32px;
|
|
color: var(--muted);
|
|
animation: fadeIn 280ms ease;
|
|
}
|
|
|
|
.emptyTitle {
|
|
margin: 0 0 8px;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.emptyDesc {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
line-height: 1.7;
|
|
max-width: 280px;
|
|
}
|
|
|
|
@keyframes riseIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(8px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.workspace {
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
}
|
|
|
|
.articlePane {
|
|
grid-column: 1 / -1;
|
|
max-height: 42vh;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.workspace {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.articlePane {
|
|
grid-column: auto;
|
|
max-height: none;
|
|
}
|
|
|
|
.header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.actions {
|
|
width: 100%;
|
|
justify-content: flex-start;
|
|
}
|
|
}
|