mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2025-03-14 07:27:33 +00:00
33 lines
495 B
Plaintext
33 lines
495 B
Plaintext
---
|
|
import type { CollectionEntry } from 'astro:content'
|
|
import PostPreview from './PostPreview.astro'
|
|
|
|
export type Props = {
|
|
posts: CollectionEntry<'blog'>[]
|
|
}
|
|
|
|
const { posts } = Astro.props
|
|
---
|
|
|
|
<ul>
|
|
{
|
|
posts.map((post) => (
|
|
<li>
|
|
<a href={`/blog/${post.slug}`}>
|
|
<PostPreview {post} />
|
|
</a>
|
|
</li>
|
|
))
|
|
}
|
|
</ul>
|
|
|
|
<style>
|
|
ul {
|
|
max-width: 40rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6rem;
|
|
list-style: none;
|
|
}
|
|
</style>
|