From 99d10f92cdee3705c788aaa3c3e08301fd22b0b8 Mon Sep 17 00:00:00 2001 From: Jorge Vargas Date: Mon, 23 Jun 2025 14:25:46 -0600 Subject: [PATCH 1/2] Fix animation and platform links --- src/pages/album/[id].astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/album/[id].astro b/src/pages/album/[id].astro index 4f335b8..2264834 100644 --- a/src/pages/album/[id].astro +++ b/src/pages/album/[id].astro @@ -186,7 +186,7 @@ const coverImage = await getImage({ {platform.name} ) : ( - + {platform.name} )} @@ -221,7 +221,7 @@ const coverImage = await getImage({ {album?.animations.map(({ animation }, i) => ( - + {animation.title} {i !== album?.animations.length - 1 && ', '} From 3a6fe133da16c04efa0fa00f77c84c57c69acec6 Mon Sep 17 00:00:00 2001 From: Jorge Vargas Date: Mon, 23 Jun 2025 14:34:32 -0600 Subject: [PATCH 2/2] Add series field to game album pages --- src/pages/album/[id].astro | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pages/album/[id].astro b/src/pages/album/[id].astro index 2264834..28e58ec 100644 --- a/src/pages/album/[id].astro +++ b/src/pages/album/[id].astro @@ -35,7 +35,7 @@ const album = await prismaClient.albums.findUnique({ categories: { select: { categoryName: true } }, classifications: { select: { classificationName: true } }, platforms: { select: { platform: { select: { id: true, name: true } } } }, - games: { select: { game: { select: { slug: true, name: true } } } }, + games: { select: { game: { select: { slug: true, name: true,series: {select: {series: {select: {slug: true, name: true}}}} } } } }, animations: { select: { animation: { select: { id: true, title: true } } } }, stores: { select: { url: true, provider: true }, where: { NOT: { provider: 'SOON' } } }, discs: { select: { number: true, body: true } }, @@ -51,6 +51,7 @@ const album = await prismaClient.albums.findUnique({ if (!album) return Astro.redirect("/404"); +const series = album.games.map(g => g.game.series).flat().map(s => s.series) const { currentLocale } = Astro const coverImage = await getImage({ src: `https://cdn.sittingonclouds.net/album/${album?.id}.png`, @@ -197,6 +198,23 @@ const coverImage = await getImage({ ) } + { + series.length > 0 && ( + + {m.series()} + + {series.map((s, i) => ( + + + {s.name} + + {i !== series.length - 1 && ', '} + + ))} + + + ) + } { (album?.games.length ?? 0) > 0 && (