Files
blog/src/components/IndexView.astro
2026-07-20 23:19:16 +08:00

30 lines
564 B
Plaintext

---
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;
}
</style>