Change Location hover photo change effect

This commit is contained in:
2021-10-02 13:24:17 +02:00
parent a47617d895
commit ec77cde75d
2 changed files with 19 additions and 12 deletions

View File

@@ -8,7 +8,6 @@
import Badge from '$components/atoms/Badge.svelte'
export let location: any
export let index: number
const { settings: { limit_new }}: any = getContext('global')
const { name, slug, country, date_updated } = location
@@ -72,12 +71,14 @@
{/if}
</div>
</a>
<div class="location__photos">
{#each location.photos as photo, index}
<Image
class={index === photoIndex ? 'is-visible' : null}
id={photo.image.id} alt={photo.image.title} width={240} height={160} quality={70}
/>
{/each}
</div>
{#if location.photos.length}
<div class="location__photos">
{#each location.photos as photo, index}
<Image
class={index === photoIndex ? 'is-visible' : null}
id={photo.image.id} alt={photo.image.title} width={240} height={160} quality={70}
/>
{/each}
</div>
{/if}
</div>