Disable lazyloaded images for Collage
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
export let location: any = undefined
|
export let location: any = undefined
|
||||||
export let city: string = undefined
|
export let city: string = undefined
|
||||||
export let hovered: boolean = false
|
export let hovered: boolean = false
|
||||||
|
export let lazy: boolean = true
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
const sizes = {
|
const sizes = {
|
||||||
@@ -30,11 +31,12 @@
|
|||||||
{#if url}
|
{#if url}
|
||||||
<a href={url} sveltekit:noscroll>
|
<a href={url} sveltekit:noscroll>
|
||||||
<Image
|
<Image
|
||||||
id={id}
|
{id}
|
||||||
sizeKey="postcard"
|
sizeKey="postcard"
|
||||||
{sizes}
|
{sizes}
|
||||||
ratio={1.5}
|
ratio={1.5}
|
||||||
alt={alt}
|
{alt}
|
||||||
|
{lazy}
|
||||||
/>
|
/>
|
||||||
{#if title && location}
|
{#if title && location}
|
||||||
<div class="photo-card__info">
|
<div class="photo-card__info">
|
||||||
@@ -51,11 +53,12 @@
|
|||||||
</a>
|
</a>
|
||||||
{:else}
|
{:else}
|
||||||
<Image
|
<Image
|
||||||
id={id}
|
{id}
|
||||||
sizeKey="postcard"
|
sizeKey="postcard"
|
||||||
{sizes}
|
{sizes}
|
||||||
ratio={1.5}
|
ratio={1.5}
|
||||||
alt={alt}
|
{alt}
|
||||||
|
{lazy}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
location={location}
|
location={location}
|
||||||
city={city}
|
city={city}
|
||||||
hovered={hovered === index}
|
hovered={hovered === index}
|
||||||
|
lazy={false}
|
||||||
on:hover={({ detail }) => hovered = detail ? index : null}
|
on:hover={({ detail }) => hovered = detail ? index : null}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
Reference in New Issue
Block a user