Revelav3/src/components/settings/CreditsCard.astro
MotorTruck1221 d6ff02f284
Put the catalog in the [lang] folder.
Still no clue on how to i18n translations for that
2024-10-17 03:43:57 -06:00

19 lines
691 B
Text

---
import { Image } from "astro:assets";
import { type ImageMetadata } from "astro";
const images = import.meta.glob<{ default: ImageMetadata }>(
"/src/assets/credits/*.{jpeg,jpg,png,gif,webp}"
);
interface Props {
image?: string;
name: string;
link: string;
}
const { image, name, link } = Astro.props;
---
<a class="rounded-md bg-navbar-color h-50 w-50 p-2 flex flex-col items-center" href={link} target="_blank" rel="noopener noreferrer">
{image && <Image loading='lazy' class='w-32 h-32 object-cover rounded-md' src={images[image]()} alt={name} />}
<p class="h-12 w-full text-text-color flex items-center justify-center text-xl font-semibold">{name}</p>
</a>