Skip to content

Commit

Permalink
make the placeholders look less pixelated
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-i-todorov committed Jan 7, 2024
1 parent b7e73ef commit ac0c9e8
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions app/components/blurrable-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,20 @@ export const BlurrableImage = ({
'relative isolate',
)}
>
{/* it gets the alt from the props */}
{/* eslint-disable-next-line jsx-a11y/alt-text */}
<img
{...props}
src={`data:image/webp;base64,${dataUrl}`}
className={clsx(props.className, 'absolute inset-0 z-0')}
/>
<div
className={clsx(
getWidthAndHeight(props.className ?? ''),
'absolute inset-0 z-0 backdrop-blur-xl',
)}
>
{/* it gets the alt from the props */}
{/* eslint-disable-next-line jsx-a11y/alt-text */}
<img
{...props}
src={`data:image/webp;base64,${dataUrl}`}
className={clsx(props.className)}
/>
</div>
{/* it gets the alt from the props */}
{/* eslint-disable-next-line jsx-a11y/alt-text */}
<img
Expand All @@ -65,7 +72,7 @@ export const BlurrableImage = ({
hidden: !isLoaded,
},
props.className,
'animate-fade-in relative z-[1]',
'relative z-[1] animate-fade-in',
)}
ref={imageRef}
/>
Expand Down

0 comments on commit ac0c9e8

Please sign in to comment.