mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2024-11-30 04:02:51 +01:00
Adjust banner number on frontpage
This commit is contained in:
parent
c8d4aef434
commit
5b60b018c5
2 changed files with 14 additions and 8 deletions
|
@ -76,21 +76,27 @@
|
||||||
<div class="bg-item rounded-xl p-4 flex flex-col">
|
<div class="bg-item rounded-xl p-4 flex flex-col">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<img src="/images/home/{image}" alt="banner" style="min-height: 150px;" {width} {height} />
|
<img src="/images/home/{image}" alt="banner" style="min-height: 150px;" {width} {height} />
|
||||||
<div class="flex flex-wrap text-white justify-end items-center absolute bottom-0 w-full">
|
<div class="flex flex-wrap text-white justify-between items-center absolute bottom-0 w-full">
|
||||||
{#each Object.entries(featured) as [_, item], i}
|
{#each Object.entries(featured) as [_, item], i}
|
||||||
<div
|
<div
|
||||||
class="flex flex-col pt-2"
|
class="flex flex-col pt-2 max-w-[60%]"
|
||||||
style="background: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 17%, rgba(0,0,0,0.75) 70%, rgba(0,0,0,0) 100%);
|
style="background: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 17%, rgba(0,0,0,0.75) 70%, rgba(0,0,0,0) 100%);"
|
||||||
{i === 0 ? 'margin-right: 10%;' : ''}"
|
|
||||||
>
|
>
|
||||||
<h3 class="text-3xl mr-4 font-black leading-6 text-right">
|
<h3 class="text-3xl font-black leading-6 text-right {i === 0 ? 'ml-4' : ''}">
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<Icon path={mdiLoading} spin size={0.8} />
|
<Icon path={mdiLoading} spin size={0.8} />
|
||||||
{:else}
|
{:else}
|
||||||
{item.count}
|
{(item.count / 1000).toFixed(1)}K
|
||||||
{/if}
|
{/if}
|
||||||
</h3>
|
</h3>
|
||||||
<p class="mr-4 font-sm leading-2 text-right">{$t(item.name)}</p>
|
<p
|
||||||
|
class="font-sm leading-2 whitespace-nowrap overflow-hidden text-ellipsis {i === 0
|
||||||
|
? 'ml-4 text-left'
|
||||||
|
: 'text-right'}"
|
||||||
|
style="direction: rtl;"
|
||||||
|
>
|
||||||
|
{$t(item.name)}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script context="module">
|
<script context="module">
|
||||||
export async function load({ fetch }) {
|
export async function load({ fetch }) {
|
||||||
const promoted = ['xingqiu', 'sucrose'];
|
const promoted = ['ganyu', 'sangonomiya_kokomi'];
|
||||||
const builds = {};
|
const builds = {};
|
||||||
for (const p of promoted) {
|
for (const p of promoted) {
|
||||||
const response = await fetch(`/characters/build/${p}.json`);
|
const response = await fetch(`/characters/build/${p}.json`);
|
||||||
|
|
Loading…
Reference in a new issue