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}