astro first commit

This commit is contained in:
2024-11-22 00:42:48 +01:00
parent 13eb767fa0
commit d4e9b2027e
156 changed files with 11589 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
---
import type { CollectionEntry } from 'astro:content'
import PostPreview from './PostPreview.astro'
export type Props = {
posts: CollectionEntry<'blog'>[]
}
const { posts } = Astro.props
---
<section>
<ul>
{
posts.map((post) => (
<li>
<a href={`/blog/${post.slug}`}>
<PostPreview {post} />
</a>
</li>
))
}
</ul>
</section>
<style>
section {
padding: 3rem;
}
ul {
max-width: 40rem;
display: flex;
flex-direction: column;
gap: 4rem;
}
</style>