fix(mp): 文章列表页对齐 mp-04 原型 — 分类Tab+卡片布局+字号

- 分类Tab: 选中态 pri 白字+阴影,未选中 surface-alt 圆角药丸
- 文章卡片: 80×80 缩略图+标题 16px serif+摘要 13px+元信息 12px
- ContentCard padding=sm margin=none,PageShell padding=none
- 缩略图 80×80(原型 80×80),封面 r-xs=8(原型 rXs=8)
This commit is contained in:
iven
2026-05-17 14:55:56 +08:00
parent 29d77e8c3d
commit b8ce19f5dc
2 changed files with 47 additions and 35 deletions

View File

@@ -1,31 +1,32 @@
@import '../../styles/variables.scss';
// PageShell 已接管min-height, background, padding
// ContentCard 已接管article-card 背景/圆角/阴影/触摸反馈
// LoadingCard 已接管:初始加载骨架屏
// EmptyState 已接管:空状态样式
// 文章列表页 — 对齐原型 docs/design/mp-04-article-report.html → ArticleList
/* ─── 分类筛选滚动条(页面特有) ─── */
/* ─── 分类筛选滚动条 ─── */
.article-categories {
white-space: nowrap;
margin-bottom: var(--tk-gap-lg);
padding: var(--tk-gap-sm) var(--tk-page-padding);
margin-bottom: var(--tk-gap-xs);
}
.article-cat-tab {
display: inline-block;
padding: var(--tk-gap-sm) var(--tk-card-padding-lg);
margin-right: var(--tk-gap-sm);
font-size: var(--tk-font-h1);
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 18px;
margin-right: 8px;
font-size: var(--tk-font-body-sm);
font-weight: 400;
color: $tx2;
background: $card;
border-radius: $r-lg;
border: 2px solid transparent;
background: $surface-alt;
border-radius: 20px;
transition: all 0.2s;
&--active {
color: var(--tk-pri);
background: var(--tk-pri-l);
border-color: var(--tk-pri);
font-weight: bold;
background: var(--tk-pri);
color: $white;
font-weight: 600;
box-shadow: 0 2px 8px rgba(196, 98, 58, 0.2);
}
}
@@ -33,23 +34,31 @@
.article-list {
display: flex;
flex-direction: column;
gap: var(--tk-section-gap);
gap: var(--tk-gap-sm);
padding: 0 var(--tk-page-padding) var(--tk-page-padding);
.content-card {
display: flex;
gap: 14px;
}
}
/* ─── 文章卡片内容ContentCard 已接管外层卡片样式) ─── */
/* ─── 文章卡片内容 ─── */
.article-card-body {
flex: 1;
display: flex;
flex-direction: column;
margin-right: var(--tk-section-gap);
justify-content: space-between;
min-width: 0;
}
.article-card-title {
font-size: var(--tk-font-num);
font-weight: bold;
font-family: Georgia, 'Times New Roman', serif;
font-size: var(--tk-font-body);
font-weight: 700;
color: $tx;
line-height: 1.4;
margin-bottom: var(--tk-gap-xs);
line-height: 1.35;
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
@@ -58,11 +67,11 @@
}
.article-card-summary {
font-size: var(--tk-font-h1);
font-size: var(--tk-font-cap);
color: $tx2;
line-height: 1.4;
display: block;
margin-bottom: var(--tk-gap-sm);
margin-bottom: var(--tk-gap-2xs);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -70,27 +79,28 @@
.article-card-meta {
display: flex;
align-items: center;
gap: var(--tk-gap-sm);
font-size: var(--tk-font-micro);
color: $tx3;
}
.article-card-tag {
font-size: var(--tk-font-body);
font-size: var(--tk-font-micro);
color: var(--tk-pri);
background: var(--tk-pri-l);
padding: 2px var(--tk-gap-sm);
border-radius: $r-sm;
padding: 2px 8px;
border-radius: $r-xs;
}
.article-card-date {
font-size: var(--tk-font-body);
font-size: var(--tk-font-micro);
color: $tx3;
}
.article-card-cover {
width: 180px;
height: 120px;
border-radius: $r-sm;
width: 80px;
height: 80px;
border-radius: $r-xs;
overflow: hidden;
flex-shrink: 0;
}

View File

@@ -81,7 +81,7 @@ export default function ArticleList() {
}
return (
<PageShell safeBottom className={modeClass}>
<PageShell safeBottom padding="none" className={modeClass}>
{/* 分类筛选 */}
{categories.length > 0 && (
<ScrollView scrollX className='article-categories'>
@@ -112,6 +112,8 @@ export default function ArticleList() {
{articles.map((a) => (
<ContentCard
key={a.id}
padding="sm"
margin="none"
onPress={() => goToDetail(a.id)}
>
<View className='article-card-body'>