Tabs to spaces and code cleaning
This commit is contained in:
@@ -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 @@
|
||||
<div class="photo__location wrap">
|
||||
<div class="wrapper">
|
||||
<h2 class="title-location">{photo.name.replace(', ', ',\n')}</h2>
|
||||
<p class="style-caps">{!!location && location.region}, {!!location && location.country.name}</p>
|
||||
<p class="style-caps">{location.region}, {location.country.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user