feat: 重构图书墙交互及多源高阶信息抓取注入系统
1. UI 层: - 抛弃网格卡片结构,改版为沉浸式的“图书墙”(1:1.43 原比例包含模式)。 - 新增悬浮深色遮罩系统(hover-details),解绑评分点击阻塞。 - 过滤系统默认进入“在读”状态页,彻底移除冗余无效的全选按钮。 2. 抓取与刮削层 (scrape.py): - 抛弃对 ISBN 查询 Google Books 的严重强依赖。 - 重构抓取链路,首选 Goodreads 与特供的 Books.com.tw(博客来) 高精爬取港台原版资料。 - 建立 Amazon/Goodreads 图片去码净化正则,告别低分辨率与畸形图片。 - 修复 bs4 (.select_first) 解析选择器在旧版环境的兼容性异常。 3. Agent AI 数据管线设计 (bookshelf.py): - 开放基于 --json 与 --cover 的强力直接注入功能。 - 升级 add 命令作为最优先级的录入手段,免去繁琐的 enrich 阶段,直接连带高清图和满载元数据强插。 - 建立入库反重名智能拦截 (title + author 交叉校验),形成完美的防呆与自动化壁垒。
This commit is contained in:
+136
-22
@@ -177,15 +177,16 @@ body {
|
||||
/* Book Grid */
|
||||
.book-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 1.2rem;
|
||||
padding: 1.5rem;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Book Card */
|
||||
/* Book Card (Book Wall Style) */
|
||||
.book-card {
|
||||
position: relative;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
@@ -197,32 +198,54 @@ body {
|
||||
|
||||
.book-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: var(--shadow);
|
||||
border-color: rgba(124, 106, 239, 0.2);
|
||||
box-shadow: 0 12px 24px rgba(0,0,0,0.3);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.card-cover-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 1 / 1.43; /* Standard book proportion */
|
||||
background: var(--bg-secondary);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-cover {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
object-fit: cover;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card-cover--placeholder {
|
||||
height: 160px;
|
||||
.card-scores-container {
|
||||
padding: 0.6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 3rem;
|
||||
background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card-hover));
|
||||
gap: 0.5rem;
|
||||
background: var(--bg-card);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 1rem 1.2rem 1.2rem;
|
||||
.card-hover-details {
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
padding: 1.2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
flex: 1;
|
||||
background: rgba(15, 15, 20, 0.92);
|
||||
backdrop-filter: blur(8px);
|
||||
color: #eee;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
z-index: 3;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.book-card:hover .card-hover-details {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@@ -232,6 +255,26 @@ body {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.card-priority {
|
||||
color: #fbbf24;
|
||||
font-size: 0.9rem;
|
||||
margin-left: 0.4rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.card-group {
|
||||
font-size: 0.72rem;
|
||||
color: var(--accent-light);
|
||||
background: rgba(124, 106, 239, 0.15);
|
||||
padding: 0.15rem 0.5rem;
|
||||
border-radius: 4px;
|
||||
align-self: flex-start;
|
||||
margin-bottom: 0.2rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.card-meta {
|
||||
font-size: 0.82rem;
|
||||
color: var(--text-secondary);
|
||||
@@ -252,21 +295,35 @@ body {
|
||||
|
||||
.score {
|
||||
font-size: 0.78rem;
|
||||
padding: 0.15rem 0.6rem;
|
||||
padding: 0.2rem 0.6rem;
|
||||
border-radius: 999px;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: all var(--transition);
|
||||
background: var(--bg-secondary) !important;
|
||||
border: 1px solid var(--border) !important;
|
||||
color: var(--text-primary) !important;
|
||||
}
|
||||
|
||||
a.score:hover {
|
||||
filter: brightness(1.2);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.score.douban {
|
||||
background: rgba(0, 180, 0, 0.1);
|
||||
color: #4ade80;
|
||||
border: 1px solid rgba(0, 180, 0, 0.15);
|
||||
color: #4ade80 !important;
|
||||
}
|
||||
|
||||
.score.goodreads {
|
||||
background: rgba(96, 165, 250, 0.1);
|
||||
color: #60a5fa;
|
||||
border: 1px solid rgba(96, 165, 250, 0.15);
|
||||
color: #60a5fa !important;
|
||||
}
|
||||
|
||||
.card-title-en {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
font-family: serif;
|
||||
margin-top: -0.2rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.card-tags {
|
||||
@@ -315,6 +372,63 @@ body {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
/* Group Overview */
|
||||
#group-overview {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
padding: 1.5rem;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.group-section {
|
||||
background: var(--bg-card);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.5rem;
|
||||
box-shadow: var(--shadow);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.group-section-title {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
border-bottom: 2px solid var(--border);
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.group-count {
|
||||
color: var(--text-muted);
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.group-covers {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.tiny-cover {
|
||||
height: 110px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
||||
transition: transform var(--transition);
|
||||
object-fit: contain;
|
||||
background: var(--bg-secondary);
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tiny-cover:hover {
|
||||
transform: scale(1.15);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 640px) {
|
||||
.hero h1 { font-size: 1.8rem; }
|
||||
|
||||
Reference in New Issue
Block a user