Skip to content

Commit 3fdd978

Browse files
committed
fix: remove unnecessary lead paragraphs and adjust styling for category and recent updates sections
1 parent db1c666 commit 3fdd978

2 files changed

Lines changed: 5 additions & 21 deletions

File tree

.vitepress/theme/components/CategoryCards.vue

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,11 @@ import { data as categories } from "../category.data";
1313
KNOWLEDGE_AREAS
1414
<span class="category-title-cn">知识分类</span>
1515
</h2>
16-
<p class="category-lead">
17-
按主题进入知识库,先了解目录范围,再继续浏览文章。
18-
</p>
1916
</div>
2017
</div>
2118

2219
<div class="category-grid">
23-
<article
24-
v-for="(category, index) in categories"
25-
:key="category.name"
26-
class="category-card"
27-
>
20+
<article v-for="(category, index) in categories" :key="category.name" class="category-card">
2821
<div class="category-card-line"></div>
2922
<div class="category-card-meta">
3023
<span class="category-index">
@@ -35,10 +28,7 @@ import { data as categories } from "../category.data";
3528
</span>
3629
</div>
3730
<h3 class="category-card-title">
38-
<a
39-
:href="withBase(category.url)"
40-
class="category-card-link"
41-
>
31+
<a :href="withBase(category.url)" class="category-card-link">
4232
{{ category.title }}
4333
</a>
4434
</h3>
@@ -74,8 +64,8 @@ import { data as categories } from "../category.data";
7464
7565
.category-heading-deco {
7666
flex: 0 0 auto;
67+
align-self: stretch;
7768
width: 4px;
78-
height: 48px;
7969
background: var(--y-grad);
8070
box-shadow: 0 0 10px var(--y-accent);
8171
}
@@ -241,10 +231,6 @@ import { data as categories } from "../category.data";
241231
font-size: 21px;
242232
}
243233
244-
.category-heading-deco {
245-
height: 60px;
246-
}
247-
248234
.category-grid {
249235
grid-template-columns: 1fr;
250236
}
@@ -255,6 +241,7 @@ import { data as categories } from "../category.data";
255241
}
256242
257243
@media (prefers-reduced-motion: reduce) {
244+
258245
.category-card,
259246
.category-card-line,
260247
.category-action span {

.vitepress/theme/components/RecentPosts.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ const formatDateTime = (timestamp: number) => {
2323
RECENT_UPDATES
2424
<span class="cn-title">最近更新</span>
2525
</h2>
26-
<p class="title-lead">
27-
查看近期新增与修订的内容,快速了解知识库的最新变化。
28-
</p>
2926
</div>
3027
</div>
3128
<div class="grid">
@@ -96,8 +93,8 @@ html.dark {
9693
}
9794
9895
.title-deco {
96+
align-self: stretch;
9997
width: 4px;
100-
height: 48px;
10198
background: var(--y-grad);
10299
box-shadow: 0 0 10px var(--y-accent);
103100
}

0 commit comments

Comments
 (0)