style: 调整移动端视觉

This commit is contained in:
2026-08-14 22:40:26 +08:00
parent 555135aedb
commit d7bbb7b70b
5 changed files with 19 additions and 14 deletions

View File

@@ -142,10 +142,6 @@ const published_at = formatDatetime(post.published_at, 'YYYY-MM-DD')
} }
@media (max-width: 860px) { @media (max-width: 860px) {
.post-list {
gap: 16px;
}
.post-card { .post-card {
padding: 16px; padding: 16px;
gap: 12px; gap: 12px;
@@ -172,7 +168,7 @@ const published_at = formatDatetime(post.published_at, 'YYYY-MM-DD')
} }
.post-title { .post-title {
font-size: 16px; font-size: 14px;
margin-bottom: 4px; margin-bottom: 4px;
} }
@@ -181,11 +177,6 @@ const published_at = formatDatetime(post.published_at, 'YYYY-MM-DD')
font-size: 12px; font-size: 12px;
} }
.post-cover {
width: 100px;
height: 62px;
}
.post-summary { .post-summary {
font-size: 12px; font-size: 12px;
margin-bottom: 6px; margin-bottom: 6px;

View File

@@ -28,4 +28,10 @@ const {posts} = Astro.props
flex-direction: column; flex-direction: column;
gap: 20px; gap: 20px;
} }
@media (max-width: 860px){
.post-list{
gap: 12px;
}
}
</style> </style>

View File

@@ -24,9 +24,10 @@ const {page, totalPage} = Astro.props
<style> <style>
/* ========== 分页 ========== */ /* ========== 分页 ========== */
.pagination { .pagination {
display: flex; width: 100%;
justify-content: center; text-align: center;
gap: 8px; white-space: nowrap;
overflow-x: auto;
} }
.link { .link {
@@ -42,6 +43,12 @@ const {page, totalPage} = Astro.props
font-size: 14px; font-size: 14px;
color: var(--text-secondary); color: var(--text-secondary);
transition: all 0.2s; transition: all 0.2s;
white-space: nowrap;
margin-left: 8px;
}
.link:first-child {
margin-left: 0;
} }
.link:hover, .link:hover,

View File

@@ -41,7 +41,7 @@ const {data:posts} = await http.get<ApiResponse<Post[]>>("posts/search", {
const count = posts.length const count = posts.length
const pageTitle = const pageTitle =
f_count === 0 ? "所有文章" : [findCategory?.name, findTag?.name,] f_count === 0 ? "所有文章" : [findCategory?.name, findTag?.name]
.filter(Boolean) .filter(Boolean)
.join(" · ") .join(" · ")

View File

@@ -1,6 +1,7 @@
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box;
} }
a { a {