forked from phc/website
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
974 B
Plaintext
31 lines
974 B
Plaintext
---
|
|
import { getCollection } from 'astro:content'
|
|
|
|
import PageLayout from '@layouts/PageLayout.astro'
|
|
|
|
const news = await getCollection('news')
|
|
---
|
|
|
|
<PageLayout title="Notizie | PHC" pageTags="notizie">
|
|
<h1><a href="/notizie">Notizie</a></h1>
|
|
<div class="card-list">
|
|
{
|
|
news.map(newsItem => (
|
|
<div class="card">
|
|
<a href={`/notizie/${newsItem.slug}`} class="title">
|
|
{newsItem.data.title}
|
|
</a>
|
|
<div class="text small dimmed">
|
|
{new Date(newsItem.data.publishDate).toLocaleDateString('it-IT', {
|
|
year: 'numeric',
|
|
month: 'long',
|
|
day: 'numeric',
|
|
})}
|
|
</div>
|
|
<div class="text">{newsItem.data.description}</div>
|
|
</div>
|
|
))
|
|
}
|
|
</div>
|
|
</PageLayout>
|