Skip to content

Commit 14f237b

Browse files
committed
refactor(blog): Remove inline tag display from blog and home pages
1 parent 3311b9e commit 14f237b

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/pages/blog/index.astro

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ const posts = rawPosts.map((post) => {
5151
· <span class="relative-time"></span>更新
5252
</span>
5353
)}
54-
{post.data.tags && (
55-
<span class="tags">
56-
{post.data.tags.map((tag: string) => <span class="tag">{tag}</span>)}
57-
</span>
58-
)}
5954
</p>
6055
<p class="excerpt">{post.data.description}</p>
6156
</article>
@@ -123,18 +118,6 @@ const posts = rawPosts.map((post) => {
123118
cursor: help;
124119
}
125120

126-
.tags {
127-
display: flex;
128-
gap: 0.5rem;
129-
}
130-
131-
.tag {
132-
background: var(--bg-secondary);
133-
padding: 0.15rem 0.5rem;
134-
border-radius: 4px;
135-
font-size: 0.75rem;
136-
}
137-
138121
.excerpt {
139122
color: var(--text-secondary);
140123
font-size: 0.95rem;

src/pages/index.astro

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ const posts = rawPosts.map((post) => {
4949
<time datetime={post.date.toISOString()}>
5050
{post.date.toLocaleDateString('zh-CN')}
5151
</time>
52-
{post.data.tags && (
53-
<span class="tags">
54-
{post.data.tags.map((tag: string) => <span class="tag">{tag}</span>)}
55-
</span>
56-
)}
5752
</p>
5853
<p class="excerpt">{post.data.description}</p>
5954
</article>
@@ -130,18 +125,6 @@ const posts = rawPosts.map((post) => {
130125
margin-bottom: 0.5rem;
131126
}
132127

133-
.tags {
134-
display: flex;
135-
gap: 0.5rem;
136-
}
137-
138-
.tag {
139-
background: var(--bg-secondary);
140-
padding: 0.15rem 0.5rem;
141-
border-radius: 4px;
142-
font-size: 0.75rem;
143-
}
144-
145128
.excerpt {
146129
color: var(--text-secondary);
147130
font-size: 0.95rem;

0 commit comments

Comments
 (0)