swipe(event.detail.directions)} >
{#each photos as { id, name, location, image }, index}
{name}, {location.name}, {location.country.name}= currentIndex - 2 && index <= currentIndex + 2 // If last photo, load the two first ones (index = 0) || currentIndex === photos.length - 1 && (index === 0 || index === 1) // If first photo, load the two last ones (index = photos length) || currentIndex === 0 && (index === photos.length - 1 || index === photos.length - 2) } >
{/each}
goToPhoto('prev')} >
goToPhoto('next')} >
{#if viewer} {/if}
{#each photos as { id, name, location }, index}

{name}

{#if locationUrl} {location.name}, {location.country.name} {:else} {location.name}, {location.country.name} {/if}

{/each}
{#if viewer}

{formatDate(currentPhoto.date, 'FULL')}

{/if}
currentIndex = event.detail} />