From 58475c8673f1cf22e5323c20e915c9f21b9a81f7 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 29 Jan 2026 11:31:55 -0600 Subject: [PATCH] feat: add page selector dropdown with animated pagination controls Replace Previous/Next buttons with 5-slot page navigation centered in pagination bar. Current page becomes a dropdown trigger allowing direct page jumps. Side slots animate on page transitions. --- web/src/lib/components/Pagination.svelte | 164 ++++++++++++++++++++--- 1 file changed, 142 insertions(+), 22 deletions(-) diff --git a/web/src/lib/components/Pagination.svelte b/web/src/lib/components/Pagination.svelte index c7e32e9..087eea7 100644 --- a/web/src/lib/components/Pagination.svelte +++ b/web/src/lib/components/Pagination.svelte @@ -1,4 +1,8 @@ -{#if totalCount > 0} -
- - Showing {start}–{end} of {totalCount} courses - -
- - +{#if totalCount > 0 && totalPages > 1} +
+ +
+ + Showing {start}–{end} of {totalCount} courses +
+ + +
+ {#key currentPage} + {#each pageSlots as page, i (i)} + {#if i === 2} + + { + if (v) goToPage(Number(v)); + }} + items={pageItems} + > + + {currentPage} + + + + + + + + + {#each pageItems as item (item.value)} + + {item.label} + + {/each} + + + + + + + + {:else} + + + {/if} + {/each} + {/key} +
+ + +
+
+{:else if totalCount > 0} + +
+ + Showing {start}–{end} of {totalCount} courses +
{/if}