diff --git a/src/molecules/Photo.svelte b/src/molecules/Photo.svelte index a8e0b41..473a6c1 100644 --- a/src/molecules/Photo.svelte +++ b/src/molecules/Photo.svelte @@ -12,8 +12,8 @@ dayjs.extend(advancedFormat) // Props and variables - export let index export let photo + export let index export let layout = 'list' let photoElement @@ -22,16 +22,16 @@ const defaultHeight = Math.ceil(defaultWidth / 1.5) // Reactive variables for location informations - $: location = $currentLocation - $: imgAlt = !!location ? `${photo.name}, ${location.region}, ${location.country.name}` : 'Loading…' - $: photoHref = !!location ? `/viewer/${location.country.slug}/${location.slug}/${photo.slug}` : '#' + const location = photo.location + const imgAlt = `${photo.name}, ${location.region}, ${location.country.name}` + const photoHref = `/viewer/${location.country.slug}/${location.slug}/${photo.slug}` /* ** Run code on browser only */ onMount(() => { - // Parallax on photo when image has been loaded + // Parallax on photo when the image has been loaded const parallaxNumber = basicScroll.default.create({ elem: photoElement.querySelector('.photo__image--number'), direct: photoElement, @@ -57,7 +57,7 @@
{!!location && location.region}, {!!location && location.country.name}
+{location.region}, {location.country.name}
{$site.description}
- - -{$site.explore_globe}
-{$site.description}
- -{$site.explore_globe}
+Tap for fullscreen
+Tap for fullscreen
- -