Force 3/2 format for non landscape photos on Location page

Center image on a background when square, portrait or other ratio
- Fix MutuationObserver for using components (would think a component is an item)
This commit is contained in:
2022-06-13 18:28:24 +02:00
parent b649187365
commit 615f7df4a1
5 changed files with 58 additions and 22 deletions

View File

@@ -9,6 +9,7 @@
export let photoAlt: string
export let title: string
export let index: string
export let orientation: string = undefined
export let date: string = undefined
export let city: string = undefined
</script>
@@ -28,7 +29,9 @@
</p>
</div>
<figure class="house__photo">
<figure class="house__photo"
class:not-landscape={orientation && orientation !== 'landscape'}
>
<a href={url} sveltekit:noscroll tabindex="0">
<Image
id={photoId}