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/lib/components/ComicCard.svelte | 75 ++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 frontend/src/lib/components/ComicCard.svelte (limited to 'frontend/src/lib/components/ComicCard.svelte') diff --git a/frontend/src/lib/components/ComicCard.svelte b/frontend/src/lib/components/ComicCard.svelte new file mode 100644 index 0000000..cb73e97 --- /dev/null +++ b/frontend/src/lib/components/ComicCard.svelte @@ -0,0 +1,75 @@ + + + +
+ {#if comic.artists.length || comic.circles.length} +
+ {#each comic.artists as { name } (name)} + + {/each} + {#each comic.circles as { name } (name)} + + {/each} +
+ {/if} + {#if comic.characters.length || comic.worlds.length} +
+ {#each comic.worlds as { name } (name)} + + {/each} + {#each comic.characters as { name } (name)} + + {/each} +
+ {/if} + {#if comic.tags.length} +
+ {#each comic.tags as { name, description } (name)} + + {/each} +
+ {/if} +
+ {#snippet footer()} +
+ + {#snippet icon()} + + {/snippet} + +
+ {#if comic.date} + + {#snippet icon()} + + {/snippet} + + {/if} +
+ {/snippet} +
-- cgit v1.2.3-2-gb3c3