From 4c1da43c6833a5e36e52a39fcbe93d2a2422418e Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Thu, 26 Feb 2026 15:47:26 -0600 Subject: [PATCH] feat: add logos to category cards --- src/components/cards/CategoryCard.astro | 20 +++++++++++++++++--- src/lib/directusTypes.ts | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/components/cards/CategoryCard.astro b/src/components/cards/CategoryCard.astro index 65da302..8a34fde 100644 --- a/src/components/cards/CategoryCard.astro +++ b/src/components/cards/CategoryCard.astro @@ -1,13 +1,18 @@ --- +import Logo from '@components/images/Logo.astro'; +import { getDirectusImageURL } from '@/support/url'; + interface Props { slug: string; title: string; description: string; + logoLight: string; + logoDark?: string; count: number; publishDate: string; } -const { slug, title, description, count, publishDate } = Astro.props; +const { slug, title, description, logoLight, logoDark, count, publishDate } = Astro.props; ---
@@ -18,10 +23,19 @@ const { slug, title, description, count, publishDate } = Astro.props; >
-
-

+
+
+ +
+

{title}

+
+

{description}

diff --git a/src/lib/directusTypes.ts b/src/lib/directusTypes.ts index 0e55020..5eb2287 100644 --- a/src/lib/directusTypes.ts +++ b/src/lib/directusTypes.ts @@ -53,6 +53,8 @@ export type Category = { slug: string; title: string; description: string; + logoLight: string; + logoDark: string; }; export type Application = {