Initial commit

This commit is contained in:
kai
2026-03-25 13:20:39 +08:00
commit c1ecce9719
8 changed files with 992 additions and 0 deletions
+341
View File
@@ -0,0 +1,341 @@
/* ========================================
我的书架 — 暗色主题样式
======================================== */
:root {
--bg-primary: #0f1117;
--bg-secondary: #1a1d2e;
--bg-card: #222639;
--bg-card-hover: #2a2f48;
--text-primary: #e8eaf0;
--text-secondary: #9ca3b8;
--text-muted: #6b7394;
--accent: #7c6aef;
--accent-glow: rgba(124, 106, 239, 0.3);
--accent-light: #a78bfa;
--reading: #34d399;
--read: #60a5fa;
--to-read: #fbbf24;
--paper: #f97316;
--ebook: #06b6d4;
--border: rgba(255, 255, 255, 0.06);
--radius: 16px;
--radius-sm: 10px;
--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
--transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
}
/* Hero */
.hero {
background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);
padding: 3rem 1.5rem 2.5rem;
text-align: center;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(circle at 30% 50%, rgba(124, 106, 239, 0.15) 0%, transparent 60%),
radial-gradient(circle at 80% 30%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
}
.hero-inner {
position: relative;
z-index: 1;
}
.hero h1 {
font-size: 2.5rem;
font-weight: 700;
letter-spacing: -0.02em;
margin-bottom: 0.4rem;
background: linear-gradient(to right, #e0e7ff, #c4b5fd);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero-sub {
color: rgba(255,255,255,0.5);
font-size: 1rem;
font-weight: 300;
}
/* Stats Bar */
.stats-bar {
display: flex;
justify-content: center;
gap: 0.5rem;
padding: 1.2rem 1rem;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
}
.stat {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.6rem 1.2rem;
border-radius: var(--radius-sm);
background: var(--bg-card);
min-width: 80px;
transition: transform var(--transition);
}
.stat:hover {
transform: translateY(-2px);
}
.stat-num {
font-size: 1.6rem;
font-weight: 700;
line-height: 1.2;
}
.stat-label {
font-size: 0.75rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.stat--reading .stat-num { color: var(--reading); }
.stat--read .stat-num { color: var(--read); }
.stat--to-read .stat-num { color: var(--to-read); }
.stat--paper .stat-num { color: var(--paper); }
.stat--ebook .stat-num { color: var(--ebook); }
/* Navigation */
.view-nav {
display: flex;
justify-content: center;
gap: 0.5rem;
padding: 1rem;
background: var(--bg-primary);
}
.view-btn, .filter-btn {
background: var(--bg-card);
border: 1px solid var(--border);
color: var(--text-secondary);
padding: 0.5rem 1.2rem;
border-radius: 999px;
font-size: 0.9rem;
cursor: pointer;
transition: all var(--transition);
font-family: inherit;
}
.view-btn:hover, .filter-btn:hover {
background: var(--bg-card-hover);
color: var(--text-primary);
}
.view-btn.active {
background: var(--accent);
border-color: var(--accent);
color: #fff;
box-shadow: 0 0 16px var(--accent-glow);
}
.filter-btn.active {
background: rgba(124, 106, 239, 0.15);
border-color: var(--accent);
color: var(--accent-light);
}
.filter-nav {
display: flex;
justify-content: center;
gap: 0.4rem;
padding: 0 1rem 1rem;
flex-wrap: wrap;
}
.filter-nav.hidden {
display: none;
}
/* Book Grid */
.book-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1.2rem;
padding: 1.5rem;
max-width: 1400px;
margin: 0 auto;
}
/* Book Card */
.book-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
transition: all var(--transition);
display: flex;
flex-direction: column;
}
.book-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow);
border-color: rgba(124, 106, 239, 0.2);
}
.card-cover {
width: 100%;
height: 200px;
object-fit: cover;
display: block;
}
.card-cover--placeholder {
height: 160px;
display: flex;
align-items: center;
justify-content: center;
font-size: 3rem;
background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card-hover));
}
.card-body {
padding: 1rem 1.2rem 1.2rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
flex: 1;
}
.card-title {
font-size: 1.1rem;
font-weight: 600;
line-height: 1.4;
color: var(--text-primary);
}
.card-meta {
font-size: 0.82rem;
color: var(--text-secondary);
line-height: 1.5;
}
.card-rating.personal {
font-size: 0.95rem;
color: var(--to-read);
letter-spacing: 0.08em;
}
.card-scores {
display: flex;
gap: 0.6rem;
flex-wrap: wrap;
}
.score {
font-size: 0.78rem;
padding: 0.15rem 0.6rem;
border-radius: 999px;
font-weight: 500;
}
.score.douban {
background: rgba(0, 180, 0, 0.1);
color: #4ade80;
border: 1px solid rgba(0, 180, 0, 0.15);
}
.score.goodreads {
background: rgba(96, 165, 250, 0.1);
color: #60a5fa;
border: 1px solid rgba(96, 165, 250, 0.15);
}
.card-tags {
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
}
.tag {
font-size: 0.72rem;
padding: 0.15rem 0.5rem;
background: rgba(124, 106, 239, 0.1);
color: var(--accent-light);
border-radius: 999px;
border: 1px solid rgba(124, 106, 239, 0.15);
}
.card-notes {
font-size: 0.82rem;
color: var(--text-muted);
font-style: italic;
border-left: 2px solid var(--accent);
padding-left: 0.6rem;
}
.card-dates {
font-size: 0.75rem;
color: var(--text-muted);
}
.card-format {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: auto;
padding-top: 0.4rem;
border-top: 1px solid var(--border);
}
/* Footer */
.footer {
text-align: center;
padding: 2rem;
color: var(--text-muted);
font-size: 0.8rem;
border-top: 1px solid var(--border);
margin-top: 2rem;
}
/* Responsive */
@media (max-width: 640px) {
.hero h1 { font-size: 1.8rem; }
.stats-bar { gap: 0.3rem; padding: 0.8rem 0.5rem; }
.stat { min-width: 60px; padding: 0.4rem 0.6rem; }
.stat-num { font-size: 1.2rem; }
.book-grid { grid-template-columns: 1fr; padding: 1rem; }
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
.book-card {
animation: fadeIn 0.4s ease both;
}
.book-card:nth-child(2) { animation-delay: 0.05s; }
.book-card:nth-child(3) { animation-delay: 0.1s; }
.book-card:nth-child(4) { animation-delay: 0.15s; }
.book-card:nth-child(5) { animation-delay: 0.2s; }
.book-card:nth-child(6) { animation-delay: 0.25s; }