Fix location page error and message style

This commit is contained in:
2022-07-15 20:43:22 +02:00
parent ff128c40a1
commit 9328b9d879
2 changed files with 33 additions and 17 deletions

View File

@@ -118,6 +118,7 @@
})
// Photos MutationObserver
if (photos.length) {
mutationPhotos = new MutationObserver((mutationsList) => {
// When adding new childs
for (const mutation of mutationsList) {
@@ -136,6 +137,7 @@
// Observe existing elements
const existingPhotos = photosListEl.querySelectorAll('.house')
existingPhotos.forEach(el => observerPhotos.observe(el))
}
/**
@@ -191,7 +193,7 @@
<Metas
title="Houses Of {location.name}"
description="Discover {totalPhotos} beautiful homes from {location.name}, {location.country.name}"
image={getAssetUrlKey(latestPhoto.image.id, 'share-image')}
image={latestPhoto ? getAssetUrlKey(latestPhoto.image.id, 'share-image') : null}
/>
<svelte:window bind:scrollY />

View File

@@ -233,4 +233,18 @@
}
}
}
// Message
&__message {
padding: clamp(96px, 24vw, 360px) 0 clamp(96px, 16vw, 280px);
text-align: center;
color: $color-text;
font-size: rem(24px);
font-weight: 200;
line-height: 1.4;
@include bp (sm) {
font-size: rem(28px);
}
}
}