mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-04 04:25:28 +00:00
refactor: add class property to page header
This commit is contained in:
@@ -1,17 +1,23 @@
|
|||||||
---
|
---
|
||||||
|
import cx from 'classnames';
|
||||||
|
|
||||||
import Backlink from '../components/Backlink.astro';
|
import Backlink from '../components/Backlink.astro';
|
||||||
import MainNavigation from '../components/MainNavigation.astro';
|
import MainNavigation from '../components/MainNavigation.astro';
|
||||||
import ThemeToggle from '../components/ThemeToggle.astro';
|
import ThemeToggle from '../components/ThemeToggle.astro';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
backLink?: string;
|
backLink?: string;
|
||||||
|
class?: string;
|
||||||
navigation?: boolean;
|
navigation?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { backLink, navigation = true } = Astro.props;
|
const { backLink, class: className, navigation = true } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<header class="grid grid-cols-18 grid-rows-layout mbe-layout print:hidden" role="banner">
|
<header
|
||||||
|
class={cx('grid w-full grid-cols-18 grid-rows-layout mbe-layout print:hidden', className)}
|
||||||
|
role="banner"
|
||||||
|
>
|
||||||
<Backlink backLink={backLink} />
|
<Backlink backLink={backLink} />
|
||||||
{navigation && <MainNavigation />}
|
{navigation && <MainNavigation />}
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
|
|||||||
Reference in New Issue
Block a user