From d7d43369dc239af1775d99b631fb86368bcac102 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Thu, 26 Feb 2026 16:01:02 -0600 Subject: [PATCH] feat: add logos to category header pages --- src/components/sections/HeaderSection.astro | 24 +++++++++++++++++---- src/pages/categories/[...slug].astro | 7 ++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/components/sections/HeaderSection.astro b/src/components/sections/HeaderSection.astro index 8e4b6dd..c82ac1c 100644 --- a/src/components/sections/HeaderSection.astro +++ b/src/components/sections/HeaderSection.astro @@ -1,23 +1,39 @@ --- import GoLinkPrimaryButton from '@components/buttons/GoLinkPrimaryButton.astro'; +import Logo from '@components/images/Logo.astro'; +import { getDirectusImageURL } from '@/support/url'; interface Props { title: string; subTitle: string; + logoExists?: boolean; + logoLight?: string; + logoDark?: string; btnExists?: boolean; btnTitle?: string; btnURL?: string; } -const { title, subTitle, btnExists, btnTitle, btnURL } = Astro.props; +const { title, subTitle, logoExists, logoLight, logoDark, btnExists, btnTitle, btnURL } = Astro.props; ---
-

- {title} -

+
+ {logoExists ? ( +
+ +
+ ) : null} +

+ {title} +

+

{subTitle}

diff --git a/src/pages/categories/[...slug].astro b/src/pages/categories/[...slug].astro index dfcdc02..a0610c9 100644 --- a/src/pages/categories/[...slug].astro +++ b/src/pages/categories/[...slug].astro @@ -1,7 +1,7 @@ --- import { readItems, readSingleton } from '@directus/sdk'; -import type { Post, Category } from '@lib/directusTypes'; +import type { Post } from '@lib/directusTypes'; import HeaderSection from '@components/sections/HeaderSection.astro'; import BlogCard from '@components/cards/BlogCard.astro'; @@ -54,8 +54,11 @@ const categoriesPosts = posts >