From de1af92ee561bd25ea0e45231d46600f45c0b31d Mon Sep 17 00:00:00 2001 From: stash Date: Thu, 29 Oct 2026 10:17:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E6=9D=A1=E7=9B=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=81=A2=E5=A4=8D=2024px=20=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E3=80=81179px=20=E5=B0=81=E9=9D=A2=E4=B8=8E=E5=B7=A6=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=E6=AD=A3=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 标题:level1 24/600(原来 level2 18/500) - 封面:portrait 179x269、square 96x96,margin 18/10,底色 primary-soft(原来 160 宽、灰底) - 标签:22 高、12px、2px 10px 内边距(原来 24 高 13px) - 正文段落:width 100%、14/1.7、次级色、左对齐(原来 16px 主色,flex 下收缩成内容宽而居中) - 引用:引号 32/700 红色 35%(原来 18px 主色) --- stash-web/src/App.css | 38 +++++++++++++++---- .../src/components/content/ItemDetailView.tsx | 11 ++++-- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/stash-web/src/App.css b/stash-web/src/App.css index 037d5f3..4e26bbe 100644 --- a/stash-web/src/App.css +++ b/stash-web/src/App.css @@ -369,6 +369,16 @@ .item-title { justify-content: center; gap: 6px; + font-size: var(--su-font-size-xl); + font-weight: var(--su-font-weight-semibold); + line-height: 1.5; +} + +/* 旧版标签:2px 10px、12px、主色浅底 */ +.item-tag { + height: 22px; + padding: 0 10px; + font-size: var(--su-font-size-xs); } .item-edit { @@ -387,20 +397,22 @@ .item-cover { display: grid; place-items: center; - width: 120px; - margin: var(--su-space-4) 0; + margin: 18px 0 10px; overflow: hidden; - border-radius: var(--su-radius-md); - background-color: var(--su-bg-light); + background-color: var(--su-color-primary-soft); + color: var(--su-color-primary); } .item-cover--square { - aspect-ratio: 1; + width: 96px; + height: 96px; + border-radius: var(--su-radius-md); } .item-cover--portrait { - width: 160px; + width: 179px; aspect-ratio: 2 / 3; + border-radius: var(--su-radius-cover); } .item-cover img { @@ -423,9 +435,11 @@ } .item-quote-mark { - font-size: var(--su-font-size-lg); + flex-shrink: 0; + font-size: 32px; + font-weight: var(--su-font-weight-strong); line-height: 1; - color: var(--su-color-primary); + color: color-mix(in srgb, var(--su-color-danger) 35%, transparent); } .item-quote-text { @@ -434,6 +448,14 @@ color: var(--su-text-sub); } +/* 旧版正文段落:占满卡片宽度、左对齐、14/1.7、次级色 */ +.item-desc { + width: 100%; + margin-top: 10px; + line-height: 1.7; + text-align: left; +} + .item-actions { display: flex; align-items: center; diff --git a/stash-web/src/components/content/ItemDetailView.tsx b/stash-web/src/components/content/ItemDetailView.tsx index d8c9e78..6054480 100644 --- a/stash-web/src/components/content/ItemDetailView.tsx +++ b/stash-web/src/components/content/ItemDetailView.tsx @@ -41,7 +41,7 @@ export function ItemDetailView({ - + <Title level={1} as="h2" weight="semibold" className="item-title"> {model.title} <button type="button" className="item-edit" disabled title="编辑功能待接入"> [编辑] @@ -59,7 +59,7 @@ export function ItemDetailView({ {model.tags.length > 0 && ( <Space gap="sm" wrap> {model.tags.map((tag) => ( - <Tag key={tag} tone="primary"> + <Tag key={tag} tone="primary" className="item-tag"> {tag} </Tag> ))} @@ -76,7 +76,12 @@ export function ItemDetailView({ )} {model.paragraphs.map((paragraph, index) => ( - <Paragraph key={`${index}-${paragraph.slice(0, 8)}`} tone="main"> + <Paragraph + key={`${index}-${paragraph.slice(0, 8)}`} + tone="sub" + size="md" + className="item-desc" + > {paragraph} </Paragraph> ))}