Center placeholder

This commit is contained in:
RumovZ 2021-10-17 22:06:44 +02:00
parent b6104fa10b
commit 2a93868922

View file

@ -24,21 +24,21 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
stats = s; stats = s;
} }
}); });
}; }
</script> </script>
<div class="container"> {#if stats}
<div> <div class="container">
{#if stats} <div>
<CardStats {stats} /> <CardStats {stats} />
{#if includeRevlog} {#if includeRevlog}
<Revlog {stats} /> <Revlog {stats} />
{/if} {/if}
{:else} </div>
<span class="placeholder">{tr.cardStatsNoCard()}</span>
{/if}
</div> </div>
</div> {:else}
<div class="placeholder">{tr.cardStatsNoCard()}</div>
{/if}
<style> <style>
.container { .container {
@ -46,6 +46,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
} }
.placeholder { .placeholder {
text-align: center; margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
</style> </style>