mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2026-05-26 13:05:25 +00:00
astro first commit
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user