feat: remove astro-imagetools

It's not worth the effort.
This commit is contained in:
Stefan Imhoff
2024-04-04 13:51:17 +02:00
parent d16afb6965
commit fc60b28ac1
55 changed files with 78 additions and 524 deletions

View File

@@ -1,5 +1,5 @@
---
import { Picture } from 'astro-imagetools/components';
import { Picture } from 'astro:assets';
import type { CollectionEntry } from 'astro:content';
interface Props {
@@ -28,19 +28,13 @@ const { entries } = Astro.props;
>
<div class="absolute z-10 h-full w-full">
{data.cover ? (
<>
{data.cover.endsWith('.svg') ? (
<img src={data.cover} alt={data.title} />
) : (
<Picture
alt={data.title}
aspect={0.6}
breakpoints={[300, 500, 1000]}
format={['avif']}
src={data.cover}
/>
)}
</>
<Picture
alt={data.title}
formats={['avif', 'webp']}
height="937"
src={data.cover}
width="1500"
/>
) : (
<div
class="h-full w-full bg-gray-800 transition duration-300 ease-in-out group-hover:brightness-[90%] group-focus:brightness-[90%] dark:brightness-[50%] dark:group-hover:brightness-[100%] dark:group-focus:brightness-[100%]"