👀 Rework how House index is displayed

Use grids to place the index instead of position absolute
Add a condition if the index starts with 1 as it has a quite smaller width
This commit is contained in:
2022-06-27 13:28:58 +02:00
parent 465e673715
commit c9053f9757
3 changed files with 51 additions and 35 deletions

View File

@@ -39,9 +39,7 @@
</p>
</div>
<div class="house__photo"
class:not-landscape={ratio < 1.475}
>
<div class="house__photo grid" class:not-landscape={ratio < 1.475}>
<a href={url} sveltekit:noscroll tabindex="0">
<figure class="house__image shadow-photo">
<Image
@@ -57,9 +55,9 @@
alt={photoAlt}
/>
</figure>
<span class="house__index title-index">
{index}
</span>
</a>
<span class="house__index title-index" class:has-one-start={index.startsWith('1')}>
{index}
</span>
</div>
</div>