fix(website): broken search page (#4)

This commit is contained in:
Luka 2024-10-29 21:34:17 +01:00 committed by GitHub
parent f0d04fc87c
commit b4c447a129
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,32 +69,33 @@
goto(`/search?${params}`) goto(`/search?${params}`)
}} }}
let:pages
> >
<div class="flex items-center space-x-1"> {#snippet children({ pages })}
<Pagination.PrevButton <div class="flex items-center space-x-1">
class="hover:enabled:bg-card-hover inline-flex size-8 items-center justify-center rounded transition disabled:opacity-50" <Pagination.PrevButton
> class="hover:enabled:bg-card-hover inline-flex size-8 items-center justify-center rounded transition disabled:opacity-50"
<ChevronLeft /> >
</Pagination.PrevButton> <ChevronLeft />
{#each pages as page (page.key)} </Pagination.PrevButton>
{#if page.type === "ellipsis"} {#each pages as page (page.key)}
<div class="px-2">...</div> {#if page.type === "ellipsis"}
{:else} <div class="px-2">...</div>
<Pagination.Page {:else}
{page} <Pagination.Page
class="hover:bg-card-hover hover:text-heading data-[selected]:bg-primary-bg data-[selected]:text-primary-fg inline-flex size-8 items-center justify-center rounded font-bold transition" {page}
> class="hover:bg-card-hover hover:text-heading data-[selected]:bg-primary-bg data-[selected]:text-primary-fg inline-flex size-8 items-center justify-center rounded font-bold transition"
{page.value} >
</Pagination.Page> {page.value}
{/if} </Pagination.Page>
{/each} {/if}
<Pagination.NextButton {/each}
class="hover:enabled:bg-card-hover inline-flex size-8 items-center justify-center rounded transition disabled:opacity-50" <Pagination.NextButton
> class="hover:enabled:bg-card-hover inline-flex size-8 items-center justify-center rounded transition disabled:opacity-50"
<ChevronRight /> >
</Pagination.NextButton> <ChevronRight />
</div> </Pagination.NextButton>
</div>
{/snippet}
</Pagination.Root> </Pagination.Root>
{/snippet} {/snippet}