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(' ');
---
-