0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-04 00:20:26 +03:00

Added Pagination component

This commit is contained in:
2024-09-12 22:10:31 +00:00
parent 3591bebabf
commit de1885fe8f
5 changed files with 82 additions and 14 deletions

View File

@ -1,14 +0,0 @@
---
import { getCollection } from "astro:content";
import Element from "../components/PostElement.astro";
import Layout from "../layouts/BaseLayout.astro";
const posts = await getCollection("blog");
posts.sort((a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime());
---
<Layout>
<section>
{posts.map((post) => <Element post={post} />)}
</section>
</Layout>