diff --git a/src/lib/components/DNDGroup.svelte b/src/lib/components/DNDGroup.svelte index a2af143..b21b9c5 100644 --- a/src/lib/components/DNDGroup.svelte +++ b/src/lib/components/DNDGroup.svelte @@ -79,7 +79,7 @@ }} onconsider={handleDndConsider} onfinalize={handleDndFinalize} - class="grid grid-cols-3 items-center gap-2 rounded-xl p-3 transition-colors sm:gap-6 md:gap-8 lg:gap-12 xl:gap-14" + class="grid grid-cols-3 items-center gap-2 rounded-xl p-2 px-3 transition-colors sm:gap-6 md:gap-8 lg:gap-12 xl:gap-14" > {#each items as item, i (item.id)}
diff --git a/src/routes/(games)/(singlescreen)/pakubiiti/+page.svelte b/src/routes/(games)/(singlescreen)/pakubiiti/+page.svelte index 577a954..22d09e0 100644 --- a/src/routes/(games)/(singlescreen)/pakubiiti/+page.svelte +++ b/src/routes/(games)/(singlescreen)/pakubiiti/+page.svelte @@ -8,6 +8,8 @@ import type { PageData } from './$types'; import { enhance } from '$app/forms'; import type { AlbumData } from '$lib/types'; + import { fade } from 'svelte/transition'; + import { expoIn, expoOut } from 'svelte/easing'; let { data }: { data: PageData; form: FormData } = $props(); @@ -25,36 +27,37 @@ {#snippet footer(loading: boolean)} -
+

Skoor: {data.stage}

{#if loading} - {:else} - + {/if}

Parim: {data.highscore}

-
+ {/snippet} {#snippet playArea(albums: AlbumData | undefined, placeholder = false)} {#if placeholder} - {#each { length: 2 }} -
+ {#each { length: 3 } as _, i} +
{#each { length: 3 }} - + {#if i < 2} + + {:else} + + {/if} {/each}
- + {#if i < 2} + + {/if} {/each} - -
- {#each { length: 3 }} - - {/each} -
{:else if albums} @@ -62,8 +65,6 @@ {/if} - - {@render footer(placeholder)} {/snippet} @@ -92,7 +93,7 @@ -
+

Paku biiti

Lohista kokku õiged albumi nimed, @@ -105,16 +106,38 @@ action="?/submit" method="POST" use:enhance - class="grid w-full gap-4 transition-all {loading || data?.playing === false ? 'grayscale' : ''}" + class="grid w-full transition-all {loading || data?.playing === false ? 'grayscale' : ''}" > {#if data?.streamed?.albums} {#await data.streamed.albums} - {@render playArea(undefined, true)} +

+ {@render playArea(undefined, true)} +
+ {@render footer(true)} {:then albums} - {@render playArea(albums as AlbumData)} +
+ {@render playArea(albums as AlbumData)} +
+ {@render footer(false)} {/await} {:else} - {@render playArea(oldAlbums)} +
+ {@render playArea(oldAlbums)} +
+ {@render footer(false)} {/if} + +