Show message when no photos are available on Location

This commit is contained in:
2021-10-12 17:12:33 +02:00
parent 759dbaf7b3
commit 56c523679b
2 changed files with 66 additions and 43 deletions

View File

@@ -145,6 +145,7 @@
<div class="location-page__illustration" /> <div class="location-page__illustration" />
</section> </section>
{#if photos.length}
<section class="location-page__houses grid"> <section class="location-page__houses grid">
{#each photos as { title, image: { id, title: alt }, slug, date_taken }, index} {#each photos as { title, image: { id, title: alt }, slug, date_taken }, index}
<div class="house grid"> <div class="house grid">
@@ -195,6 +196,14 @@
{/if} {/if}
</div> </div>
</section> </section>
{:else}
<div class="location-page__message">
<p>
No photos available for {data.name}.<br>
Come back later!
</p>
</div>
{/if}
</main> </main>

View File

@@ -202,4 +202,18 @@
cursor: not-allowed; cursor: not-allowed;
} }
} }
// 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);
}
}
} }