martials.no/src/components/projects/ProjectCard.astro

35 lines
768 B
Plaintext
Raw Normal View History

2024-09-25 22:20:47 +02:00
---
import { Image } from "astro:assets"
import { type ImageMetadata } from "astro"
import BadgeList from "../badge/BadgeList.astro"
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
linkTo: NavLink
2024-09-25 22:20:47 +02:00
}
const { title, description, tags, image, imageAlt, linkTo } = Astro.props
---
<LocaleLink
to={linkTo}
class="card bg-base-100 max-w-96 shadow-xl hover:scale-105 transition"
2024-09-25 22:20:47 +02:00
>
<figure>
<Image src={image} alt={imageAlt} />
</figure>
<div class="card-body">
<h2 class="card-title">
{title}
</h2>
<p>{description}</p>
<BadgeList tags={tags} />
</div>
</LocaleLink>