feat: 首页改版

This commit is contained in:
2026-07-20 22:14:20 +08:00
parent 95320835b6
commit a5f4d0a28d
16 changed files with 359 additions and 130 deletions

View File

@@ -0,0 +1,35 @@
---
import type {Post, CategoriesStats} from "@/types/post";
import IndexSidebar from "@/components/IndexSidebar.astro";
import PostList from '@/components/PostList.astro'
interface Props {
posts: Post[]
page: number
totalPage: number
categories: CategoriesStats[]
}
const {posts, page, totalPage, categories} = Astro.props
---
<div class="container">
<PostList posts={posts} page={page} totalPage={totalPage}/>
<IndexSidebar categories={categories}/>
</div>
<style>
.container {
width: 100%;
display: flex;
gap: 28px;
}
@media (max-width: 860px) {
.container{
flex-direction: column-reverse;
gap: 16px;
}
}
</style>