feat: better handling of empty sections #141

This commit is contained in:
ThaUnknown 2022-04-14 15:07:09 +02:00
parent 1be5e79af4
commit b42144a559
3 changed files with 14 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "1.4.11",
"version": "1.4.12",
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"main": "src/index.js",
"homepage": "https://github.com/ThaUnknown/miru#readme",

View file

@ -81,10 +81,19 @@
</div>
</div>
{/if}
{:else}
<div class="empty d-flex flex-column align-items-center justify-content-center">
<h2 class="font-weight-semi-bold mb-10">Ooops!</h2>
<div>Looks like there's nothing here.</div>
</div>
{/each}
{/await}
<style>
.empty {
height: 27rem;
grid-column: 1 / -1;
}
.h-10 {
height: 1rem !important;
}

View file

@ -38,6 +38,10 @@
grid-template-columns: repeat(5, 50rem);
}
.gallery :global(.empty) {
grid-column: 1/3 !important;
}
.gallery:after {
content: '';
position: absolute;