24 lines
449 B
Plaintext
24 lines
449 B
Plaintext
---
|
|
import type { Article } from '@/lib/site/types'
|
|
|
|
import ArticleCardItem from './ArticleCardItem.astro'
|
|
|
|
type Props = {
|
|
articles: Article[]
|
|
title?: string
|
|
}
|
|
|
|
const { articles, title } = Astro.props
|
|
---
|
|
|
|
{articles.length > 0 && (
|
|
<section class="cards">
|
|
{title && <h2 class="title">{title}</h2>}
|
|
<div class="grid">
|
|
{articles.map((article) => (
|
|
<ArticleCardItem article={article} />
|
|
))}
|
|
</div>
|
|
</section>
|
|
)}
|