Disable lazyloaded images for Collage

This commit is contained in:
2022-05-23 12:08:20 +02:00
parent 5b3fbb7ece
commit f417b80aab
2 changed files with 8 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
export let location: any = undefined
export let city: string = undefined
export let hovered: boolean = false
export let lazy: boolean = true
const dispatch = createEventDispatcher()
const sizes = {
@@ -30,11 +31,12 @@
{#if url}
<a href={url} sveltekit:noscroll>
<Image
id={id}
{id}
sizeKey="postcard"
{sizes}
ratio={1.5}
alt={alt}
{alt}
{lazy}
/>
{#if title && location}
<div class="photo-card__info">
@@ -51,11 +53,12 @@
</a>
{:else}
<Image
id={id}
{id}
sizeKey="postcard"
{sizes}
ratio={1.5}
alt={alt}
{alt}
{lazy}
/>
{/if}
</div>

View File

@@ -17,6 +17,7 @@
location={location}
city={city}
hovered={hovered === index}
lazy={false}
on:hover={({ detail }) => hovered = detail ? index : null}
/>
{/each}