style: 格式化 CSS、JS 和 HTML 代码

This commit is contained in:
admin committed 2026-09-22 09:31:55 +08:00
1 parent 40b00a8b40
commit 69bfe3ce0e
9 files changed
+3397 -230

No files matched your search

+106 -25
View File
@@ -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;
}
}
}