From 361f506cd3677f61d2203ff91fab70ba3a1c5851 Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Thu, 20 Feb 2025 19:33:55 +0100
Subject: 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.
---
 frontend/src/routes/+page.svelte | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'frontend/src/routes/+page.svelte')

diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte
index d2a59c8..237b573 100644
--- a/frontend/src/routes/+page.svelte
+++ b/frontend/src/routes/+page.svelte
@@ -6,7 +6,7 @@
 	import { href } from '$lib/Navigation';
 	import { fadeDefault } from '$lib/Transitions';
 	import logo from '$lib/assets/logo.webp';
-	import Card, { comicCard } from '$lib/components/Card.svelte';
+	import ComicCard from '$lib/components/ComicCard.svelte';
 	import Guard from '$lib/components/Guard.svelte';
 	import Head from '$lib/components/Head.svelte';
 	import Carousel from '$lib/containers/Carousel.svelte';
@@ -52,21 +52,21 @@
 			{#if recent && recent.count > 0}
 				<Carousel title="Recently added" href={recentLink}>
 					{#each recent.edges as comic}
-						<Card coverOnly {...comicCard(comic)} />
+						<ComicCard coverOnly {comic} />
 					{/each}
 				</Carousel>
 			{/if}
 			{#if favourites && favourites.count > 0}
 				<Carousel title="Favourites" href={favouriteLink}>
 					{#each favourites.edges as comic}
-						<Card coverOnly {...comicCard(comic)} />
+						<ComicCard coverOnly {comic} />
 					{/each}
 				</Carousel>
 			{/if}
 			{#if bookmarked && bookmarked.count > 0}
 				<Carousel title="Bookmarks" href={bookmarkLink}>
 					{#each bookmarked.edges as comic}
-						<Card coverOnly {...comicCard(comic)} />
+						<ComicCard coverOnly {comic} />
 					{/each}
 				</Carousel>
 			{/if}
-- 
cgit v1.2.3-2-gb3c3

