Align overview/list-detail cards and card-wrap the toolbar and paginator
Remove the outer horizontal padding insetting cards away from the title card's edges on both pages, and wrap the overview page's search/sort/view toolbar and paginator in cards to match the rest of the app. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1b8191a68e
commit
c29520fcd3
2 files changed
+9
-5
No files matched your search
@@ -55,8 +55,8 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex-1 px-4 pb-4">
|
<div class="flex-1 space-y-4 py-4">
|
||||||
<div class="mb-4 grid grid-cols-2 gap-4 sm:grid-cols-4">
|
<div class="grid grid-cols-2 gap-4 sm:grid-cols-4">
|
||||||
<div class="rounded-lg border border-border bg-surface p-3">
|
<div class="rounded-lg border border-border bg-surface p-3">
|
||||||
<div class="text-xs text-muted-fg">Lists</div>
|
<div class="text-xs text-muted-fg">Lists</div>
|
||||||
<div class="mt-1 text-lg font-semibold text-fg">{overview.stats.lists}</div>
|
<div class="mt-1 text-lg font-semibold text-fg">{overview.stats.lists}</div>
|
||||||
@@ -83,7 +83,8 @@
|
|||||||
{:else if overview.error}
|
{:else if overview.error}
|
||||||
<p class="text-sm text-danger">{overview.error.message}</p>
|
<p class="text-sm text-danger">{overview.error.message}</p>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="mb-3 flex flex-wrap items-center gap-2">
|
<section class="rounded-lg border border-border bg-surface p-3">
|
||||||
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
<div class="relative min-w-0 flex-1 basis-full sm:basis-auto">
|
<div class="relative min-w-0 flex-1 basis-full sm:basis-auto">
|
||||||
<Search class="pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-fg" />
|
<Search class="pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-fg" />
|
||||||
<input
|
<input
|
||||||
@@ -143,6 +144,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="overflow-x-auto rounded-lg border border-border bg-bg p-3">
|
<div class="overflow-x-auto rounded-lg border border-border bg-bg p-3">
|
||||||
{#if viewMode.mode === 'list'}
|
{#if viewMode.mode === 'list'}
|
||||||
@@ -152,6 +154,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<section class="rounded-lg border border-border bg-surface">
|
||||||
<Paginator
|
<Paginator
|
||||||
{page}
|
{page}
|
||||||
{pageSize}
|
{pageSize}
|
||||||
@@ -162,5 +165,6 @@
|
|||||||
pageSize = e.pageSize;
|
pageSize = e.pageSize;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
const pageItems = $derived(listItems.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize));
|
const pageItems = $derived(listItems.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="px-4 pb-4">
|
<div class="space-y-4 py-4">
|
||||||
<div class="mb-4 flex min-w-0 items-center gap-3">
|
<div class="flex min-w-0 items-center gap-3">
|
||||||
<Button type="button" variant="secondary" size="sm" class="shrink-0" onclick={goBack}>
|
<Button type="button" variant="secondary" size="sm" class="shrink-0" onclick={goBack}>
|
||||||
<ArrowLeft class="size-4" />
|
<ArrowLeft class="size-4" />
|
||||||
Back
|
Back
|
||||||
|
|||||||
Reference in new issue
Block a user