feat: enhance UI styling, add date picker, and clean up inline CSS

This commit is contained in:
2026-06-09 15:12:58 +08:00
parent 18f44ac244
commit b72b5a31bb
6 changed files with 634 additions and 168 deletions
+272 -74
View File
@@ -14,6 +14,18 @@
--border-soft: #e5e3d8; /* soft row separator */
--shadow: rgba(0, 0, 0, 0.05); /* whisper shadow */
--radius: 8px;
--radius-lg: 12px;
/* 语义色 */
--success: var(--success);
--success-bg: #e8f5e9;
--danger: var(--danger);
--danger-bright: var(--danger-bright);
--danger-bg: var(--danger-bg);
--danger-hover: #a13030;
--warning: #7a6430;
--tag-bg: var(--tag-bg);
--info-bg: #e3f2fd;
/* 字体 — Kami serif-first */
--font-body: "TsangerJinKai02", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
@@ -125,7 +137,7 @@ a:hover {
text-decoration: none;
}
/* ── Date Chips ─────────────────────────────────────────────────── */
/* ── Date Quick Nav ─────────────────────────────────────────────── */
.date-quick-nav {
margin-top: 32px;
padding-top: 16px;
@@ -138,7 +150,11 @@ a:hover {
flex-wrap: wrap;
}
.date-chip {
/* ── Chips (shared) ─────────────────────────────────────────────── */
.date-chip,
.tag-chip,
.filter-chip {
display: inline-block;
padding: 4px 10px;
background: var(--surface);
border: 1px solid var(--border);
@@ -146,16 +162,25 @@ a:hover {
font-size: 0.8rem;
color: var(--ink-light);
}
.date-chip:hover {
.date-chip:hover,
.tag-chip:hover,
.filter-chip:hover {
border-color: var(--accent);
color: var(--accent);
text-decoration: none;
}
.date-chip.active {
.date-chip.active,
.tag-chip.active,
.filter-chip.active {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
.filter-chip {
padding: 6px 14px;
border-radius: var(--radius);
font-size: 0.85rem;
}
/* ── Paper Card ─────────────────────────────────────────────────── */
.paper-list {
@@ -227,7 +252,7 @@ a:hover {
.tag {
display: inline-block;
padding: 1px 5px;
background: #EEF2F7;
background: var(--tag-bg);
color: var(--accent);
border-radius: 2px;
font-size: 0.75rem;
@@ -262,12 +287,12 @@ a:hover {
}
.summary-done {
background: rgba(27, 54, 93, 0.08);
color: #3d6e3d;
color: var(--success);
}
.summary-failed,
.summary-permanent_failure {
background: rgba(140, 40, 40, 0.08);
color: #8c2828;
color: var(--danger);
}
.btn-detail {
@@ -408,7 +433,7 @@ a:hover {
}
.error-detail {
font-size: 0.85rem;
color: #8c2828;
color: var(--danger);
margin-top: 8px;
}
@@ -451,7 +476,11 @@ a:hover {
transition: border-color 0.2s;
font-family: var(--font-sans);
}
.nav-search-input:focus {
.nav-search-input:focus,
.search-input:focus,
.paper-search-input:focus,
.paper-filter-input:focus,
.login-field input:focus {
outline: none;
border-color: var(--accent);
}
@@ -474,9 +503,7 @@ a:hover {
color: var(--ink);
}
.search-input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(45, 95, 138, 0.1);
box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.1);
}
.search-btn {
@@ -506,25 +533,7 @@ a:hover {
font-size: 0.85rem;
color: var(--ink-light);
}
.tag-chip {
display: inline-block;
padding: 4px 10px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 4px;
font-size: 0.8rem;
color: var(--ink-light);
}
.tag-chip:hover {
border-color: var(--accent);
color: var(--accent);
text-decoration: none;
}
.tag-chip.active {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
/* .tag-chip: shared chip styles (see Chips section) */
/* ── Search Meta & Sort ─────────────────────────────────────────── */
.search-meta {
@@ -614,25 +623,7 @@ mark {
margin-bottom: 16px;
}
.filter-chip {
display: inline-block;
padding: 6px 14px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 0.85rem;
color: var(--ink-light);
}
.filter-chip:hover {
border-color: var(--accent);
color: var(--accent);
text-decoration: none;
}
.filter-chip.active {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
/* .filter-chip: shared chip styles (see Chips section) */
/* ── Paper Card Footer (enhanced) ──────────────────────────────── */
.paper-footer {
@@ -688,11 +679,11 @@ mark {
}
.reading-read_summary {
background: rgba(27, 54, 93, 0.06);
color: #3d6e3d;
color: var(--success);
}
.reading-read_full {
background: rgba(27, 54, 93, 0.10);
color: #3d6e3d;
color: var(--success);
font-weight: 500;
}
@@ -786,7 +777,7 @@ mark {
color: var(--accent);
white-space: nowrap;
padding: 2px 8px;
background: #EEF2F7;
background: var(--tag-bg);
border-radius: 4px;
font-variant-numeric: tabular-nums;
}
@@ -1019,31 +1010,64 @@ mark {
/* ── 图片灯箱 ── */
.lightbox-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
height: 100vh !important;
z-index: 99999 !important;
background: rgba(0, 0, 0, 0.85);
display: flex;
align-items: center;
justify-content: center;
cursor: zoom-out;
overflow: hidden;
margin: 0 !important;
padding: 0 !important;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s, visibility 0.2s;
transition: opacity 0.2s;
}
.lightbox-overlay.active {
opacity: 1;
visibility: visible;
}
.lightbox-overlay img {
max-width: 95vw;
max-height: 95vh;
object-fit: contain;
position: absolute;
transform-origin: 0 0;
border-radius: 4px;
box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
cursor: grab;
user-select: none;
-webkit-user-drag: none;
}
.lightbox-overlay img.dragging {
cursor: grabbing;
}
.lightbox-toolbar {
position: absolute;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 8px;
background: rgba(0, 0, 0, 0.6);
padding: 8px 14px;
border-radius: 24px;
z-index: 100000;
}
.lightbox-toolbar button {
background: none;
border: 1px solid rgba(255, 255, 255, 0.3);
color: #fff;
width: 36px;
height: 36px;
border-radius: 50%;
font-size: 1.1rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s;
}
.lightbox-toolbar button:hover {
background: rgba(255, 255, 255, 0.15);
}
/* ── Benchmark 表格 ── */
@@ -1065,7 +1089,7 @@ mark {
border-bottom: 1px solid var(--border);
}
.benchmarks-table .improvement {
color: #3d6e3d;
color: var(--success);
font-weight: 500;
}
@@ -1114,8 +1138,8 @@ mark {
}
.login-error {
background: #fce4ec;
color: #c62828;
background: var(--danger-bg);
color: var(--danger-bright);
padding: 10px 14px;
border-radius: var(--radius);
font-size: 0.85rem;
@@ -1151,8 +1175,6 @@ mark {
}
.login-field input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.1);
}
@@ -1180,3 +1202,179 @@ mark {
padding: 28px 20px;
}
}
/* ── Kami Date Picker ──────────────────────────────────────────── */
.kami-date-picker-wrapper {
position: relative;
display: inline-block;
}
.kami-date-popup {
position: absolute;
top: calc(100% + 6px);
left: 50%;
transform: translateX(-50%) translateY(-4px);
z-index: 200;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: 0 4px 24px var(--shadow);
padding: 16px;
min-width: 280px;
opacity: 0;
visibility: hidden;
transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.kami-date-popup.open {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
}
.kami-date-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
font-family: var(--font-body);
font-size: 0.95rem;
font-weight: 500;
color: var(--ink);
}
.kami-date-header button {
width: 28px;
height: 28px;
background: none;
border: 1px solid var(--border);
border-radius: 4px;
cursor: pointer;
color: var(--ink-light);
font-size: 1rem;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s;
padding: 0;
}
.kami-date-header button:hover {
border-color: var(--accent);
color: var(--accent);
}
.kami-date-weekdays {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 2px;
margin-bottom: 4px;
}
.kami-date-weekdays span {
text-align: center;
font-size: 0.75rem;
color: var(--ink-muted);
font-weight: 500;
padding: 4px 0;
}
.kami-date-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 2px;
}
.kami-date-day {
position: relative;
text-align: center;
padding: 6px 0;
font-size: 0.82rem;
border-radius: 4px;
cursor: pointer;
color: var(--ink);
transition: background 0.15s, color 0.15s;
user-select: none;
}
.kami-date-day:hover {
background: var(--accent-bg);
}
.kami-date-day.muted {
color: var(--ink-muted);
opacity: 0.35;
cursor: default;
}
.kami-date-day.muted:hover {
background: none;
}
.kami-date-day.today {
font-weight: 600;
box-shadow: inset 0 0 0 1px var(--accent);
}
.kami-date-day.selected {
background: var(--accent);
color: #fff;
font-weight: 500;
}
.kami-date-day.selected:hover {
background: var(--accent-hover);
}
.kami-date-day.disabled {
color: var(--ink-muted);
opacity: 0.3;
cursor: not-allowed;
}
.kami-date-day.disabled:hover {
background: none;
}
/* 小圆点 — 标记有数据的日期 */
.kami-date-day.marked::after {
content: '';
position: absolute;
bottom: 2px;
left: 50%;
transform: translateX(-50%);
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--accent);
}
.kami-date-day.selected.marked::after {
background: #fff;
}
.kami-date-footer {
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid var(--border);
text-align: center;
}
.kami-date-footer a {
font-size: 0.8rem;
color: var(--ink-muted);
}
.kami-date-footer a:hover {
color: var(--accent);
text-decoration: none;
}
/* date-title 上的日历小图标 */
.date-picker-icon {
font-size: 0.85rem;
margin-left: 4px;
opacity: 0.45;
vertical-align: middle;
}
/* 管理后台日期输入框样式 */
.kami-date-input {
cursor: pointer;
width: 110px;
}
.kami-date-input::placeholder {
color: var(--ink-muted);
}
/* 移动端响应式 */
@media (max-width: 480px) {
.kami-date-popup {
min-width: 260px;
}
}