Place: Conditions if undefined latest photo and no illustration
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
|
||||
// Define dates
|
||||
$: latestPhoto = photos[0]
|
||||
$: latestPhotoModified = latestPhoto.modified_on.replace(' ', 'T')
|
||||
$: latestPhotoModified = latestPhoto ? latestPhoto.modified_on.replace(' ', 'T') : ''
|
||||
$: dateUpdatedFull = latestPhoto ? formatDate(latestPhotoModified, 'FULL') : ''
|
||||
$: dateUpdatedDatetime = latestPhoto ? formatDate(latestPhotoModified, 'DATETIME') : ''
|
||||
$: dateUpdatedRelative = latestPhoto ? relativeTime(latestPhotoModified, 2592000000) : ''
|
||||
@@ -150,9 +150,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if location.illustration_desktop && location.illustration_mobile}
|
||||
<div class="place__illustration"
|
||||
style="--url-desktop: url({location.illustration_desktop.full_url}); --url-mobile: url({location.illustration_mobile.full_url});"
|
||||
/>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<section class="photos photos--{layoutSetting || 'list'}">
|
||||
|
||||
Reference in New Issue
Block a user