Add City field to photos

Used for regions/wider locations
This commit is contained in:
2020-08-22 19:53:50 +02:00
parent 6a04e1568f
commit b990f944ca
4 changed files with 66 additions and 63 deletions

View File

@@ -15,9 +15,9 @@
const defaultHeight = Math.ceil(defaultWidth / 1.5)
// Location related
const { name, date, location } = photo
const { name, date, location, city } = photo
const { private_hash } = photo.image
const imgAlt = `${name}, ${location.region}, ${location.country.name}`
const imgAlt = `${name}, ${city ? city : location.region}, ${location.country.name}`
const nameSplit = name.split(', ')
// Photo index
@@ -44,7 +44,7 @@
</span>
{/each}
</h2>
<p class="style-caps">{location.region}, {location.country.name}</p>
<p class="style-caps">{city ? city : location.region}, {location.country.name}</p>
</div>
</div>