From 2dda71f216ed8e06c2ebeb4bdcf9cd3d19519c47 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:26:11 +0100 Subject: Slight changes to mods page --- apps/website/src/components/base/Header.astro | 24 ++++++++++++++-------- apps/website/src/components/base/Slider.astro | 2 +- .../src/components/base/navbar/Navbar.astro | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) (limited to 'apps/website/src/components/base') diff --git a/apps/website/src/components/base/Header.astro b/apps/website/src/components/base/Header.astro index 1ab879e..5292380 100644 --- a/apps/website/src/components/base/Header.astro +++ b/apps/website/src/components/base/Header.astro @@ -25,16 +25,24 @@ const { } = Astro.props; const Element = sizes[size] as any; // Unfortunately gotta do this -const className = (align === 'inherit' ? '' : `text-${align} `) - + (size === 'xxl' ? ' page-header' : '') - + (attr.class ? ` ${attr.class}` : ''); +let className: string | string[] = []; +if (align !== 'inherit') + className.push(`text-${align}`); + +if (size === 'xxl') + className.push('page-header'); + +if (attr.class) + className.push(attr.class); + +className = className.join(' '); --- - - - + + + - + diff --git a/apps/website/src/components/base/Slider.astro b/apps/website/src/components/base/Slider.astro index 139a250..1afd680 100644 --- a/apps/website/src/components/base/Slider.astro +++ b/apps/website/src/components/base/Slider.astro @@ -20,7 +20,7 @@ const { ---
diff --git a/apps/website/src/components/base/navbar/Navbar.astro b/apps/website/src/components/base/navbar/Navbar.astro index 2a1cd51..65b7473 100644 --- a/apps/website/src/components/base/navbar/Navbar.astro +++ b/apps/website/src/components/base/navbar/Navbar.astro @@ -4,7 +4,7 @@ import config from 'config'; import NavbarElement from '../navbar/NavbarElement.astro'; --- -
+