diff options
Diffstat (limited to 'apps/website/src/components/base')
-rw-r--r-- | apps/website/src/components/base/Header.astro | 24 | ||||
-rw-r--r-- | apps/website/src/components/base/Slider.astro | 2 | ||||
-rw-r--r-- | apps/website/src/components/base/navbar/Navbar.astro | 2 |
3 files changed, 18 insertions, 10 deletions
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(' '); --- - <Element {...attr} class={className}> - <slot/> - </Element> +<Element {...attr} class={className}> + <slot/> +</Element> - <style> +<style> h1 { font-size: theme("fontSize.header-lg"); &.page-header { @@ -74,4 +82,4 @@ const className = (align === 'inherit' ? '' : `text-${align} `) font-weight: inherit; } } - </style> +</style> 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 { --- <div class={ - `w-full bg-blue-100 slider + `w-full slider ${dir === 'right' ? 'reverse' : ''} ${wrapperClass}` }> 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'; --- -<div class="absolute w-full flex flex-row justify-center h-screen max-h-[110px] px-3"> +<div class="absolute w-full flex flex-row justify-center h-screen max-h-[110px] px-3 z-navbar"> <nav class="w-full max-w-[1080px] flex flex-col md:flex-row justify-between items-center"> <ul class="flex flex-row justify-start gap-4 max-sm:mt-4"> {(config as Config).navbar.left.map((element, index) => ( |