20 lines
545 B
Text
20 lines
545 B
Text
---
|
|
import Main from "../layouts/Main.astro";
|
|
import PostPreviewLarge from "../components/PostPreviewLarge.astro";
|
|
import PostGrid from "../components/PostGrid.astro";
|
|
import { getCollection } from "astro:content";
|
|
|
|
const allPostsSorted = (await getCollection('posts')).sort(
|
|
(postA, postB) =>
|
|
postB.data.date.getTime() - postA.data.date.getTime()
|
|
);
|
|
|
|
const [mostRecentPost, ...sortedPosts] = allPostsSorted;
|
|
---
|
|
|
|
<Main title="Startseite">
|
|
<PostPreviewLarge
|
|
post={mostRecentPost.data}
|
|
/>
|
|
<PostGrid posts={sortedPosts} />
|
|
</Main>
|