2024-10-06 11:41:27 +02:00
|
|
|
---
|
|
|
|
import ProjectCard from "./ProjectCard.astro"
|
2024-10-20 12:05:32 +02:00
|
|
|
import { type CollectionEntry } from "astro:content"
|
|
|
|
import { type NavLink } from "@/utils/linking"
|
2024-10-06 11:41:27 +02:00
|
|
|
|
|
|
|
interface Props {
|
2024-10-20 12:05:32 +02:00
|
|
|
projects: CollectionEntry<"projects">[]
|
2024-10-06 11:41:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const { projects } = Astro.props
|
2024-10-20 12:05:32 +02:00
|
|
|
|
|
|
|
const baseUrl: NavLink = "/projects"
|
2024-10-06 11:41:27 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
<div class="flex flex-wrap justify-around">
|
|
|
|
{
|
|
|
|
projects.map(
|
2025-02-15 14:59:32 +01:00
|
|
|
({ data: { title, description, tags, heroImage, heroImageAlt }, id }) => (
|
2024-10-06 11:41:27 +02:00
|
|
|
<div class="my-5 px-2">
|
|
|
|
<ProjectCard
|
|
|
|
title={title}
|
2024-10-20 12:05:32 +02:00
|
|
|
linkTo={`${baseUrl}/${id}`}
|
2024-10-06 11:41:27 +02:00
|
|
|
description={description}
|
|
|
|
tags={tags}
|
|
|
|
image={heroImage}
|
|
|
|
imageAlt={heroImageAlt}
|
|
|
|
/>
|
|
|
|
</div>
|
2025-02-15 14:59:32 +01:00
|
|
|
),
|
2024-10-06 11:41:27 +02:00
|
|
|
)
|
|
|
|
}
|
2025-02-15 14:59:32 +01:00
|
|
|
</div>
|