Add pagination and game cards to about page

This commit is contained in:
SirBlob committed 2026-10-31 22:53:17 -04:00
1 parent cc085be17a
commit 5d04df8d54
5 files changed
+207 -45

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
<script lang="ts">
let { currentPage = $bindable(), totalPages }: { currentPage: number; totalPages: number } = $props();
</script>
{#if totalPages > 1}
<nav class="pagination" aria-label="Pagination">
<button disabled={currentPage === 1} onclick={() => currentPage--}>&lt; prev</button>
<span class="muted">page {currentPage} of {totalPages}</span>
<button disabled={currentPage === totalPages} onclick={() => currentPage++}>next &gt;</button>
</nav>
{/if}
<style>
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
margin-top: 1.25rem;
}
button {
padding: 0.1rem 0.6rem;
background: none;
border: 1px solid color-mix(in srgb, var(--foreground) 25%, transparent);
color: var(--muted);
}
button:hover:not(:disabled) {
border-color: var(--accent);
color: var(--foreground);
}
button:disabled {
opacity: 0.4;
cursor: default;
}
</style>