2024-09-25 22:20:47 +02:00
|
|
|
---
|
|
|
|
import { Image } from "astro:assets"
|
|
|
|
import { type ImageMetadata } from "astro"
|
2024-10-06 11:41:27 +02:00
|
|
|
import BadgeList from "../badge/BadgeList.astro"
|
2024-10-20 22:25:52 +02:00
|
|
|
import LocaleLink from "../links/LocaleLink.astro"
|
|
|
|
import { type NavLink } from "@/utils/linking"
|
2024-09-25 22:20:47 +02:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
title: string
|
|
|
|
description: string
|
|
|
|
tags: string[]
|
|
|
|
image: ImageMetadata
|
|
|
|
imageAlt: string
|
2024-10-20 22:25:52 +02:00
|
|
|
linkTo: NavLink
|
2024-09-25 22:20:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const { title, description, tags, image, imageAlt, linkTo } = Astro.props
|
|
|
|
---
|
|
|
|
|
2024-10-20 22:25:52 +02:00
|
|
|
<LocaleLink
|
|
|
|
to={linkTo}
|
2025-02-16 11:49:06 +01:00
|
|
|
class="card bg-cat-base max-w-96 shadow-xl hover:scale-105 transition border border-cat-surface0"
|
2024-09-25 22:20:47 +02:00
|
|
|
>
|
|
|
|
<figure>
|
|
|
|
<Image src={image} alt={imageAlt} />
|
2025-02-16 11:49:06 +01:00
|
|
|
<figcaption class="sr-only">{imageAlt}</figcaption>
|
2024-09-25 22:20:47 +02:00
|
|
|
</figure>
|
2025-02-16 11:49:06 +01:00
|
|
|
<div class="card-body text-cat-text">
|
2024-09-25 22:20:47 +02:00
|
|
|
<h2 class="card-title">
|
|
|
|
{title}
|
|
|
|
</h2>
|
|
|
|
<p>{description}</p>
|
|
|
|
<BadgeList tags={tags} />
|
|
|
|
</div>
|
2024-10-20 22:25:52 +02:00
|
|
|
</LocaleLink>
|