summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/routes/comics/+page.svelte
diff options
context:
space:
mode:
authorWolfgang Müller2025-02-20 19:33:55 +0100
committerWolfgang Müller2025-02-21 12:12:48 +0100
commite2ea60e3d3b13e0660d9f76daf2e549563bc38d6 (patch)
treee71f78ce198ed7f986f72da3a6caa2cfe5a9e956 /frontend/src/routes/comics/+page.svelte
parent89f71d6d0029b66548acde9c3fc27201482ed2b3 (diff)
downloadhircine-e2ea60e3d3b13e0660d9f76daf2e549563bc38d6.tar.gz
frontend: Introduce ComicCard and ArchiveCard
Instead of repeatedly supplying Card content in all the places it is required, it makes more sense to create dedicated ComicCard and ArchiveCard components. These wrap around Card itself and can be used in a more straightforward and consistent fashion. Whilst we are here, simplify and streamline the display of Comic and Archive metadata by introducing a Card footer. The footer is used for information on page count, release date, and archive size.
Diffstat (limited to 'frontend/src/routes/comics/+page.svelte')
-rw-r--r--frontend/src/routes/comics/+page.svelte8
1 files changed, 3 insertions, 5 deletions
diff --git a/frontend/src/routes/comics/+page.svelte b/frontend/src/routes/comics/+page.svelte
index 03123be..11289e7 100644
--- a/frontend/src/routes/comics/+page.svelte
+++ b/frontend/src/routes/comics/+page.svelte
@@ -4,7 +4,7 @@
import { type ComicFragment } from '$gql/graphql';
import { ComicSortLabel } from '$lib/Enums';
import { ComicFilterContext } from '$lib/Filter.svelte';
- import Card, { comicCard } from '$lib/components/Card.svelte';
+ import ComicCard from '$lib/components/ComicCard.svelte';
import Empty from '$lib/components/Empty.svelte';
import Guard from '$lib/components/Guard.svelte';
import Head from '$lib/components/Head.svelte';
@@ -13,7 +13,6 @@
import UpdateComicsDialog from '$lib/dialogs/UpdateComics.svelte';
import ComicFilterForm from '$lib/filter/ComicFilterForm.svelte';
import Pagination from '$lib/pagination/Pagination.svelte';
- import ComicPills from '$lib/pills/ComicPills.svelte';
import Selectable from '$lib/selection/Selectable.svelte';
import { initSelectionContext } from '$lib/selection/Selection.svelte';
import SelectionOverlay from '$lib/selection/SelectionOverlay.svelte';
@@ -96,12 +95,11 @@
{#each comics.edges as comic, index (comic.id)}
<Selectable {index} id={comic.id}>
{#snippet children({ onclick, selected })}
- <Card {...comicCard(comic)} {onclick}>
+ <ComicCard {comic} {onclick}>
{#snippet overlay()}
<SelectionOverlay position="left" {selected} />
{/snippet}
- <ComicPills {comic} />
- </Card>
+ </ComicCard>
{/snippet}
</Selectable>
{:else}