Fix location page error and message style
This commit is contained in:
@@ -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 />
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user