troylusty.com/src/pages/projects/index.astro

22 lines
747 B
Text
Raw Normal View History

2024-12-23 21:18:55 +00:00
---
import { getCollection } from "astro:content";
import { PROJECTS, SITE } from "@consts";
import Layout from "@layouts/Layout.astro";
import ShowcaseProject from "@components/ShowcaseProject.astro";
2024-12-23 21:18:55 +00:00
const projects = (await getCollection("projects"))
.filter((project) => !project.data.draft)
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
---
<Layout title={SITE.TITLE} description={PROJECTS.DESCRIPTION}>
2025-01-17 22:16:14 +00:00
<h1 class="animate-reveal break-words text-2xl font-semibold opacity-0">
{PROJECTS.TITLE}
</h1>
<ol
2025-01-17 22:16:14 +00:00
class="mt-16 grid animate-reveal grid-cols-1 gap-4 opacity-0 [animation-delay:0.1s] md:grid-cols-2"
>
{projects.map((article: any) => <ShowcaseProject collection={article} />)}
</ol>
</Layout>