feat: refactor whole bunch of stuff

This commit is contained in:
Max Richter
2025-11-02 19:03:11 +01:00
parent 81ebc8f5e0
commit e6b90cb785
56 changed files with 753 additions and 360 deletions

View File

@@ -34,7 +34,7 @@ const Image = (
class: string;
src: string;
alt?: string;
thumbnail?: string;
thumbhash?: string;
fill?: boolean;
width?: number | string;
height?: number | string;
@@ -55,19 +55,17 @@ const Image = (
height: props.fill ? "100%" : "",
zIndex: props.fill ? -1 : "",
}}
data-thumb={props.thumbnail}
data-thumb={props.thumbhash}
>
<img
data-thumb={props.thumbnail}
data-thumb-img
loading="lazy"
alt={props.alt}
style={props.style}
srcset={responsiveAttributes.srcset}
sizes={responsiveAttributes.sizes}
src={`/api/images?image=${asset(props.src)}${
props.width ? `&width=${props.width}` : ""
}${props.height ? `&height=${props.height}` : ""}`}
src={`/api/images?image=${asset(props.src)}${props.width ? `&width=${props.width}` : ""
}${props.height ? `&height=${props.height}` : ""}`}
width={props.width}
height={props.height}
class={props.class}