Claude improvements

This commit is contained in:
Andras Schmelczer 2026-05-11 07:48:33 +01:00
parent a86940da30
commit df2267a968
79 changed files with 2695 additions and 1162 deletions

View file

@ -0,0 +1,47 @@
---
import type { ImageMetadata } from 'astro';
import { Picture } from 'astro:assets';
interface Props {
src: ImageMetadata;
alt: string;
href?: string;
class?: string;
widths: number[];
sizes: string;
loading?: 'lazy' | 'eager';
fetchpriority?: 'high' | 'low' | 'auto';
}
const {
src,
alt,
href,
class: extraClass,
widths,
sizes,
loading = 'lazy',
fetchpriority,
} = Astro.props;
const Tag = href ? 'a' : 'div';
---
<Tag
class:list={['entry-thumbnail', extraClass]}
href={href}
aria-hidden={href ? 'true' : undefined}
tabindex={href ? -1 : undefined}
>
<Picture
src={src}
alt={alt}
formats={['avif', 'webp']}
fallbackFormat="jpg"
widths={widths}
sizes={sizes}
loading={loading}
decoding="async"
fetchpriority={fetchpriority}
/>
</Tag>