diff --git a/legacy/classic/static/css/style.css b/legacy/classic/static/css/style.css index 92e4e86..58d9767 100644 --- a/legacy/classic/static/css/style.css +++ b/legacy/classic/static/css/style.css @@ -146,7 +146,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", - "Hiragino Sans GB", "Microsoft YaHei", sans-serif; + "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; @@ -154,14 +154,34 @@ body { } /* 所有主题相关元素平滑过渡 */ -.navbar, .nav-link, .stat-card, .chart-card, .top-book-card, .book-card, -.book-cover-wrapper, .notebook-card, .note-stat, .discover-card, .discover-tab, -.modal-content, .modal-overlay, .footer, .db-alert-banner, .page-btn, -.btn-primary, .btn-secondary, .search-input, .shelf-search, .highlight-item, -.review-item, .detail-progress-info, .top-book-cover-wrapper, -.theme-toggle, .loading-spinner { +.navbar, +.nav-link, +.stat-card, +.chart-card, +.top-book-card, +.book-card, +.book-cover-wrapper, +.notebook-card, +.note-stat, +.discover-card, +.discover-tab, +.modal-content, +.modal-overlay, +.footer, +.db-alert-banner, +.page-btn, +.btn-primary, +.btn-secondary, +.search-input, +.shelf-search, +.highlight-item, +.review-item, +.detail-progress-info, +.top-book-cover-wrapper, +.theme-toggle, +.loading-spinner { transition: background-color 0.3s ease, border-color 0.3s ease, - color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease; + color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease; } .container { @@ -264,12 +284,25 @@ body { transform: scale(1.08); } -.theme-toggle .icon-sun { display: none; } -.theme-toggle .icon-moon { display: block; } +.theme-toggle .icon-sun { + display: none; +} -[data-theme="dark"] .theme-toggle .icon-sun { display: block; } -[data-theme="dark"] .theme-toggle .icon-moon { display: none; } -[data-theme="dark"] .theme-toggle { color: var(--toggle-icon-sun); } +.theme-toggle .icon-moon { + display: block; +} + +[data-theme="dark"] .theme-toggle .icon-sun { + display: block; +} + +[data-theme="dark"] .theme-toggle .icon-moon { + display: none; +} + +[data-theme="dark"] .theme-toggle { + color: var(--toggle-icon-sun); +} /* ===== 顶部常驻搜索框 ===== */ .global-search-bar { @@ -382,7 +415,7 @@ body { } .shelf-cat-parent.active .shelf-cat-count { - background: rgba(255,255,255,0.25); + background: rgba(255, 255, 255, 0.25); color: #fff; } @@ -403,8 +436,15 @@ body { } @keyframes fadeIn { - from { opacity: 0; transform: translateY(-4px); } - to { opacity: 1; transform: translateY(0); } + from { + opacity: 0; + transform: translateY(-4px); + } + + to { + opacity: 1; + transform: translateY(0); + } } .shelf-cat-sub { @@ -443,7 +483,7 @@ body { } .shelf-cat-sub.active .shelf-cat-count-sm { - background: rgba(255,255,255,0.25); + background: rgba(255, 255, 255, 0.25); color: #fff; } @@ -617,8 +657,15 @@ body { } @keyframes fadeInTab { - from { opacity: 0; transform: translateY(8px); } - to { opacity: 1; transform: translateY(0); } + from { + opacity: 0; + transform: translateY(8px); + } + + to { + opacity: 1; + transform: translateY(0); + } } /* ===== 读书排行(竖向列表) ===== */ @@ -1090,7 +1137,7 @@ body { color: var(--alert-text); font-size: 14px; font-weight: 500; - box-shadow: 0 2px 8px rgba(0,0,0,0.1); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); animation: slideDown 0.3s ease-out; } @@ -1111,8 +1158,15 @@ body { } @keyframes slideDown { - from { transform: translateY(-100%); opacity: 0; } - to { transform: translateY(0); opacity: 1; } + from { + transform: translateY(-100%); + opacity: 0; + } + + to { + transform: translateY(0); + opacity: 1; + } } /* ===== 加载动画 ===== */ @@ -1133,7 +1187,9 @@ body { } @keyframes spin { - to { transform: rotate(360deg); } + to { + transform: rotate(360deg); + } } /* ===== 推荐发现区 ===== */ @@ -1756,7 +1812,7 @@ body { } .thought-filter-btn.active .filter-count { - background: rgba(255,255,255,0.25); + background: rgba(255, 255, 255, 0.25); color: #fff; } @@ -1964,78 +2020,100 @@ body { .nav-links { display: none; } + .hero-title { font-size: 24px; } + .hero-stats { gap: 24px; } + .hero-stat-value { font-size: 32px; } + .charts-grid { grid-template-columns: 1fr; } + .chart-card.large { grid-column: auto; } + .book-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; } + .top-books-list { gap: 8px; } + .top-book-row { padding: 8px 12px; gap: 10px; } + .top-book-mini-cover { width: 36px; height: 48px; } + .top-book-rank-num { width: 28px; height: 28px; font-size: 13px; } + .nav-update { display: none; } + .global-search-wrapper { max-width: 100%; } + .thoughts-toolbar { flex-direction: column; align-items: stretch; } + .thoughts-controls { flex-direction: column; gap: 8px; } + .thoughts-search-input { width: 100%; } + .thoughts-sort-select { width: 100%; } + .shelf-search { width: 140px; } + .shelf-categories { gap: 6px; } + .shelf-cat-parent { font-size: 12px; padding: 4px 10px; } + .shelf-cat-sub { font-size: 11px; padding: 3px 9px; } + .shelf-cat-subs { padding-left: 10px; } + .back-to-top { bottom: 20px; right: 20px; @@ -2043,14 +2121,17 @@ body { height: 40px; font-size: 18px; } + .thoughts-page-header { top: 0; } + .thoughts-book-cover { width: 48px; height: 64px; } + .thoughts-book-title { font-size: 16px; } -} +} \ No newline at end of file diff --git a/legacy/classic/static/js/app.js b/legacy/classic/static/js/app.js index daf6e68..50a57d0 100644 --- a/legacy/classic/static/js/app.js +++ b/legacy/classic/static/js/app.js @@ -476,11 +476,13 @@ async function loadYearlyTrend() { barWidth: "50%", itemStyle: { borderRadius: [8, 8, 0, 0], - color: { type: "linear", x: 0, y: 0, x2: 0, y2: 1, + color: { + type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: c.accentLight }, { offset: 1, color: c.accent }, - ] }, + ] + }, }, label: { show: true, position: "top", color: c.label, fontSize: 12, formatter: "{c}h" }, }], @@ -538,11 +540,13 @@ async function loadTimeDistribution() { lineStyle: { width: 2, color: c.accent }, itemStyle: { color: c.accent }, areaStyle: { - color: { type: "linear", x: 0, y: 0, x2: 0, y2: 1, + color: { + type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: c.accent + "4D" }, { offset: 1, color: c.accent + "05" }, - ] }, + ] + }, }, }], }); @@ -650,11 +654,13 @@ async function loadAuthors() { barWidth: "50%", itemStyle: { borderRadius: [0, 6, 6, 0], - color: { type: "linear", x: 0, y: 0, x2: 1, y2: 0, + color: { + type: "linear", x: 0, y: 0, x2: 1, y2: 0, colorStops: [ { offset: 0, color: c.accentLight }, { offset: 1, color: c.accent }, - ] }, + ] + }, }, label: { show: true, position: "right", color: c.label, fontSize: 12, formatter: "{c}本" }, }], diff --git a/legacy/classic/templates/index.html b/legacy/classic/templates/index.html index 803e317..ceb5c79 100644 --- a/legacy/classic/templates/index.html +++ b/legacy/classic/templates/index.html @@ -1,5 +1,6 @@ +
@@ -8,7 +9,7 @@ + @@ -208,4 +216,5 @@ - + +