Check for illustration on location page
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
let currentPage: number = 1
|
let currentPage: number = 1
|
||||||
let ended: boolean
|
let ended: boolean
|
||||||
let currentPhotosAmount: number
|
let currentPhotosAmount: number
|
||||||
|
const hasIllustration = location.illustration_desktop && location.illustration_desktop_2x && location.illustration_mobile
|
||||||
|
|
||||||
$: latestPhoto = photos[0]
|
$: latestPhoto = photos[0]
|
||||||
$: currentPhotosAmount = photos.length
|
$: currentPhotosAmount = photos.length
|
||||||
@@ -98,9 +99,9 @@
|
|||||||
<main class="location-page">
|
<main class="location-page">
|
||||||
<section class="location-page__intro grid"
|
<section class="location-page__intro grid"
|
||||||
style="
|
style="
|
||||||
--illus-desktop: url({getAssetUrlKey(location.illustration_desktop.id, 'illustration-desktop-1x')});
|
--illus-desktop: url({getAssetUrlKey(hasIllustration && location.illustration_desktop.id, 'illustration-desktop-1x')});
|
||||||
--illus-desktop-2x: url({getAssetUrlKey(location.illustration_desktop_2x.id, 'illustration-desktop-2x')});
|
--illus-desktop-2x: url({getAssetUrlKey(hasIllustration && location.illustration_desktop_2x.id, 'illustration-desktop-2x')});
|
||||||
--illus-mobile: url({getAssetUrlKey(location.illustration_mobile.id, 'illustration-mobile')});
|
--illus-mobile: url({getAssetUrlKey(hasIllustration && location.illustration_mobile.id, 'illustration-mobile')});
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
|
|||||||
Reference in New Issue
Block a user