2024-12-26 22:45:38 +00:00
|
|
|
---
|
|
|
|
import { Image } from "astro:assets";
|
|
|
|
import FormattedDate from "@components/FormattedDate.astro";
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
collection: any;
|
|
|
|
};
|
|
|
|
|
|
|
|
const { collection } = Astro.props;
|
|
|
|
---
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<article
|
2025-01-23 18:48:20 +00:00
|
|
|
class="group relative isolate mx-auto flex h-full w-full flex-col justify-end overflow-hidden rounded px-8 pt-40 pb-8"
|
2024-12-26 22:45:38 +00:00
|
|
|
>
|
|
|
|
<Image
|
|
|
|
src={collection.data.image.url}
|
|
|
|
alt={collection.data.image.alt}
|
|
|
|
title={collection.data.title}
|
|
|
|
loading="eager"
|
2025-01-05 18:49:48 +00:00
|
|
|
class="absolute inset-0 h-full w-full object-cover transition-all duration-300 group-hover:brightness-50"
|
2024-12-26 22:45:38 +00:00
|
|
|
fit="cover"
|
|
|
|
/>
|
2025-01-05 18:49:48 +00:00
|
|
|
|
2024-12-26 22:45:38 +00:00
|
|
|
<a
|
|
|
|
class="absolute inset-0 z-20"
|
|
|
|
href={`/${collection.collection}/${collection.slug}`}
|
|
|
|
aria-label={collection.data.title}></a>
|
|
|
|
<h3
|
2025-01-27 21:37:48 +00:00
|
|
|
class="z-10 w-fit text-xl font-semibold text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"
|
2024-12-26 22:45:38 +00:00
|
|
|
>
|
|
|
|
{collection.data.title}
|
|
|
|
</h3>
|
|
|
|
<div
|
2025-01-27 21:37:48 +00:00
|
|
|
class="z-10 w-fit gap-y-1 overflow-hidden text-sm leading-6 text-neutral-400 opacity-0 transition-opacity duration-500 group-hover:opacity-100"
|
2024-12-26 22:45:38 +00:00
|
|
|
>
|
|
|
|
{
|
|
|
|
collection.data.collection ? (
|
|
|
|
<span>
|
2024-12-28 16:19:26 +00:00
|
|
|
<FormattedDate date={collection.data.date} /> (Collection)
|
2024-12-26 22:45:38 +00:00
|
|
|
</span>
|
|
|
|
) : (
|
|
|
|
<FormattedDate date={collection.data.date} />
|
|
|
|
)
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</li>
|