style(frontend): 对齐 Alright 主题并接入离线字体

- 主题色板、圆角、阴影与 0.3s 缓动对齐参考站点,布局与尺寸不变
- index.html 预加载本地字体,index.css 定义 LXGW WenKai / Outfit-Medium
- 新增断网渲染端到端用例与 ADR-0006
This commit is contained in:
2026-10-26 00:38:15 +08:00
parent e555610037
commit 773196d689
6 changed files with 247 additions and 107 deletions
+79 -75
View File
@@ -67,7 +67,7 @@ h3 {
align-items: center;
gap: 8px;
min-height: 40px;
border: 1px solid #d7f2e7;
border: 1px solid var(--success-border);
border-radius: 999px;
padding: 0 14px;
background: var(--success-bg);
@@ -81,7 +81,7 @@ h3 {
}
.connection-pill.is-offline {
border-color: #ffd9df;
border-color: var(--danger-border);
background: var(--danger-bg);
color: var(--danger);
}
@@ -92,16 +92,17 @@ h3 {
align-items: center;
justify-content: center;
border: 1px solid transparent;
border-radius: 8px;
border-radius: var(--radius-sm);
padding: 8px 16px;
font-size: 13px;
font-weight: 500;
text-decoration: none;
transition:
background-color 150ms ease,
border-color 150ms ease,
color 150ms ease,
transform 150ms ease;
background-color var(--transition-base),
border-color var(--transition-base),
color var(--transition-base),
transform var(--transition-base),
opacity var(--transition-base);
}
.button:hover:not(:disabled) {
@@ -114,12 +115,13 @@ h3 {
}
.button-primary {
background: var(--text);
background: var(--primary);
color: #fff;
}
.button-primary:hover:not(:disabled) {
background: #293241;
background: var(--primary);
opacity: 0.85;
}
.button-secondary {
@@ -129,8 +131,8 @@ h3 {
}
.button-secondary:hover:not(:disabled) {
border-color: #c8ccd3;
background: #f7f8fa;
border-color: var(--text-light);
background: var(--surface-muted);
}
.button-danger {
@@ -139,7 +141,8 @@ h3 {
}
.button-danger:hover:not(:disabled) {
background: #b91c3b;
background: var(--danger);
opacity: 0.85;
}
.button-ghost {
@@ -165,7 +168,7 @@ h3 {
}
.text-button:hover {
color: var(--text);
color: var(--primary);
}
.danger-text {
@@ -178,10 +181,10 @@ h3 {
right: 24px;
bottom: 24px;
max-width: min(420px, calc(100vw - 48px));
border: 1px solid #2f3845;
border: 1px solid var(--theme-secondary);
border-radius: 12px;
padding: 14px 18px;
background: #111827;
background: var(--theme-dark);
color: #fff;
box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
font-size: 13px;
@@ -210,7 +213,7 @@ h3 {
align-items: flex-start;
justify-content: space-between;
gap: 16px;
border-color: #ffd7df;
border-color: var(--danger-border);
background: var(--danger-bg);
color: var(--danger);
}
@@ -255,8 +258,9 @@ h3 {
overflow: hidden;
display: block;
margin-top: 8px;
font-family: var(--font-display);
font-size: 26px;
font-weight: 700;
font-weight: 500;
letter-spacing: -0.03em;
line-height: 1.2;
text-overflow: ellipsis;
@@ -274,7 +278,7 @@ h3 {
.card {
overflow: hidden;
border: 1px solid var(--border);
border-radius: 18px;
border-radius: var(--radius-md);
background: var(--surface);
box-shadow: var(--shadow);
}
@@ -286,7 +290,7 @@ h3 {
gap: 14px;
border-bottom: 1px solid var(--border);
padding: 12px 18px;
background: #fafafa;
background: var(--surface-muted);
}
.search-form {
@@ -316,24 +320,24 @@ h3 {
width: 100%;
min-height: 38px;
border: 1px solid var(--border);
border-radius: 8px;
border-radius: var(--radius-sm);
outline: 0;
padding: 8px 12px;
font-size: 13px;
background: var(--surface);
color: var(--text);
transition:
border-color 150ms ease,
box-shadow 150ms ease;
border-color var(--transition-base),
box-shadow var(--transition-base);
}
.field-input:hover {
border-color: #cfd3da;
border-color: var(--text-light);
}
.field-input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
box-shadow: 0 0 0 3px var(--theme-primary-soft);
}
.field-input:disabled {
@@ -358,7 +362,7 @@ code {
border-radius: 6px;
padding: 3px 8px;
background: var(--badge-bg);
color: #374151;
color: var(--theme-secondary);
font-size: 12px;
}
@@ -376,11 +380,11 @@ code {
.task-table th {
padding: 14px 12px;
background: #fafafa;
background: var(--surface-muted);
color: var(--text-tertiary);
font-family: var(--font-sans);
font-size: 11px;
font-weight: 600;
font-weight: 500;
letter-spacing: 0.06em;
text-transform: uppercase;
white-space: nowrap;
@@ -395,11 +399,11 @@ code {
}
.task-table tbody tr {
transition: background-color 120ms ease;
transition: background-color var(--transition-base);
}
.task-table tbody tr:hover {
background: #fbfcfd;
background: var(--surface-muted);
}
.task-name {
@@ -443,7 +447,7 @@ code {
display: inline-flex;
padding: 0;
background: transparent;
color: #4b5563;
color: var(--text-muted);
font-size: 12px;
font-weight: 400;
}
@@ -455,7 +459,7 @@ code {
border-radius: 999px;
padding: 4px 10px;
background: var(--badge-bg);
color: #5d6470;
color: var(--text-muted);
font-size: 12px;
font-weight: 500;
white-space: nowrap;
@@ -470,25 +474,25 @@ code {
.status-enabled,
.status-succeeded {
background: #ecfdf5;
color: #067a56;
background: var(--success-bg);
color: #2b8a63;
}
.status-disabled,
.status-cancelled,
.status-skipped {
background: #f3f4f6;
color: #6b7280;
background: var(--badge-bg);
color: var(--text-muted);
}
.status-queued {
background: #eff6ff;
color: #2563eb;
background: var(--primary-soft);
color: var(--primary);
}
.status-running {
background: #fffbeb;
color: #b45309;
background: var(--warning-bg);
color: var(--warning);
}
.status-running .status-dot {
@@ -588,7 +592,7 @@ code {
max-height: calc(100vh - 48px);
overflow: hidden;
border: 1px solid var(--border);
border-radius: 18px;
border-radius: var(--radius-lg);
background: var(--surface);
box-shadow: var(--shadow-modal);
animation: modal-in 180ms ease-out;
@@ -699,17 +703,17 @@ code {
flex-direction: column;
gap: 6px;
overflow-y: auto;
border: 1px solid #eeeff2;
border-radius: 8px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
background: #fafafa;
background: var(--surface-muted);
}
.cron-run-item {
display: flex;
align-items: center;
gap: 8px;
color: #374151;
color: var(--theme-secondary);
font-family: var(--font-mono);
font-size: 12px;
}
@@ -722,7 +726,7 @@ code {
}
.cron-run-time {
border: 1px solid #e5e7eb;
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 8px;
background: #fff;
@@ -748,7 +752,7 @@ code {
}
.field-label {
color: #374151;
color: var(--theme-secondary);
font-size: 13px;
font-weight: 600;
}
@@ -794,7 +798,7 @@ code {
margin-top: -1px;
padding: 8px 12px;
border: 1px solid var(--border);
border-radius: 8px;
border-radius: var(--radius-sm);
background: var(--surface);
font-size: 12px;
}
@@ -839,8 +843,8 @@ code {
}
.field-input[aria-invalid='true'] {
border-color: #f08aa0;
background: #fffafb;
border-color: rgba(255, 62, 62, 0.55);
background: rgba(255, 62, 62, 0.04);
}
.field-textarea {
@@ -856,7 +860,7 @@ code {
min-height: 48px;
border: 1px solid var(--border);
border: 0;
border-radius: 8px;
border-radius: var(--radius-sm);
padding: 8px 0;
background: transparent;
cursor: pointer;
@@ -887,10 +891,10 @@ code {
.dynamic-fields {
margin: 22px 0 0;
border: 1px solid #eeeff2;
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
background: #fafafa;
background: var(--surface-muted);
}
.collection-header {
@@ -940,18 +944,18 @@ code {
.cli-preview {
margin-top: 18px;
border-radius: 8px;
border-radius: var(--radius-sm);
padding: 14px 18px;
background: #18191c;
background: var(--theme-dark);
}
.cli-preview-header {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
border-bottom: 1px solid #282a30;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
padding-bottom: 6px;
color: #71767f;
color: var(--text-tertiary);
font-size: 11px;
letter-spacing: 0.06em;
text-transform: uppercase;
@@ -965,11 +969,11 @@ code {
.cli-line-env {
margin-bottom: 4px;
color: #9da3af;
color: var(--text-tertiary);
}
.cli-line-cmd {
color: #34d399;
color: var(--success);
font-weight: 500;
overflow-wrap: anywhere;
}
@@ -980,7 +984,7 @@ code {
gap: 8px;
border-top: 1px solid var(--border);
padding: 16px 28px;
background: #fafafb;
background: var(--surface-muted);
}
.confirm-card {
@@ -1047,7 +1051,7 @@ code {
align-items: center;
gap: 10px;
border: 0;
border-radius: 8px;
border-radius: var(--radius-sm);
padding: 8px 10px;
background: transparent;
color: var(--text);
@@ -1083,7 +1087,7 @@ code {
gap: 16px;
border-top: 1px solid var(--border);
padding: 14px 24px;
background: #fafafb;
background: var(--surface-muted);
}
.directory-picker-summary {
@@ -1119,7 +1123,7 @@ code {
flex-direction: column;
overflow: hidden;
border: 1px solid var(--border);
border-radius: 18px;
border-radius: var(--radius-lg);
background: var(--surface);
box-shadow: var(--shadow-modal);
animation: drawer-in 220ms ease-out;
@@ -1158,7 +1162,7 @@ code {
.run-history-panel {
border-right: 1px solid var(--border);
background: #fafbfc;
background: var(--surface-muted);
}
.section-heading {
@@ -1208,13 +1212,13 @@ code {
}
.run-list-item:hover {
background: #fff;
background: var(--surface);
}
.run-list-item.is-selected {
border-color: var(--border);
background: #fff;
box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
border-color: var(--primary);
background: var(--primary-soft);
box-shadow: 0 4px 18px rgba(27, 26, 49, 0.06);
}
.run-list-main {
@@ -1261,35 +1265,35 @@ code {
.run-error-metadata {
grid-column: 1 / -1;
border-color: #ffd7df !important;
border-color: var(--danger-border) !important;
background: var(--danger-bg) !important;
color: var(--danger);
}
.log-viewer-wrap {
overflow: hidden;
border: 1px solid #252c38;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 14px;
background: #0d1117;
background: var(--theme-dark);
}
.log-viewer-header {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #252c38;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
padding: 10px 14px;
color: #aab4c3;
color: var(--text-tertiary);
font-family: var(--font-mono);
font-size: 10px;
}
.log-streaming {
color: #fbbf24;
color: var(--warning);
}
.log-complete {
color: #6ee7b7;
color: var(--success);
}
.log-viewer {
@@ -1298,7 +1302,7 @@ code {
overflow: auto;
margin: 0;
padding: 16px;
color: #d1d5db;
color: var(--text-light);
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.65;