20 lines
529 B
Plaintext
20 lines
529 B
Plaintext
---
|
|
import { getCollection } from 'astro:content';
|
|
import Layout from '@layouts/ActivitiesList.astro';
|
|
import List from '@components/views/List.astro';
|
|
import Grid from '@components/views/Grid.astro';
|
|
|
|
let posts = await getCollection('activities');
|
|
posts = posts.sort(
|
|
(a, b) => a.data.updated - b.data.updated,
|
|
).slice(0,16);
|
|
---
|
|
<Layout>
|
|
<div class="container m-auto py-8">
|
|
<h1>Activities</h1>
|
|
<h2>Posts { posts.length }:</h2>
|
|
|
|
<Grid data={posts} type="activities" />
|
|
|
|
</div>
|
|
</Layout> |