mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
feat: remove astro-imagetools
It's not worth the effort.
This commit is contained in:
@@ -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%]"
|
||||
|
||||
Reference in New Issue
Block a user