Center Location name for now

This commit is contained in:
2021-11-25 23:30:59 +01:00
parent 4a6e0d3758
commit 305272ea7c
2 changed files with 13 additions and 14 deletions

View File

@@ -24,7 +24,6 @@
dayjs.extend(relativeTime)
const { params } = $page
const hasIllustration = location.illustration_desktop && location.illustration_desktop_2x && location.illustration_mobile
let introEl: HTMLElement
let photosListEl: HTMLElement
@@ -39,6 +38,7 @@
$: latestPhoto = photos[0]
$: currentPhotosAmount = photos.length
$: ended = currentPhotosAmount === totalPhotos
$: hasIllustration = location.illustration_desktop && location.illustration_desktop_2x && location.illustration_mobile
/**
@@ -197,7 +197,7 @@
out:fade={{ duration: DURATION.PAGE_OUT }}
>
<section class="location-page__intro grid" bind:this={introEl}>
<h1 class="title">
<h1 class="title" class:is-short={location.name.length <= 4}>
<span class="housesof mask">
<strong class="word">Houses</strong>
<span class="of">of</span>
@@ -249,7 +249,7 @@
</div>
</div>
{#if location.illustration_mobile && location.illustration_desktop && location.illustration_desktop_2x}
{#if hasIllustration}
<picture class="location-page__illustration" style="--parallax-y: {illustrationOffsetY}px;">
<source media="(min-width: 1200px)" srcset={getAssetUrlKey(location.illustration_desktop_2x.id, 'illustration-desktop-2x')}>
<source media="(min-width: 768px)" srcset={getAssetUrlKey(location.illustration_desktop.id, 'illustration-desktop-1x')}>