2024-03-02 20:35:36 +01:00

44 lines
1.2 KiB
Plaintext

---
import Html from "./components/Html.astro";
import Topbar from "./components/Topbar/Topbar.astro";
import Footer from "./components/Footer.astro";
import type { ParentPage } from "src/shared/payload/payload-sdk";
import AppLayoutBackgroundImg from "./components/AppLayoutBackgroundImg.astro";
interface Props {
parentPages?: ParentPage[];
metaTitle?: string;
hideFooterLinks?: boolean;
backgroundIllustration?: string | undefined;
}
const { metaTitle, hideFooterLinks = false, parentPages, backgroundIllustration } = Astro.props;
---
{/* ------------------------------------------- HTML ------------------------------------------- */}
<Html title={metaTitle}>
<header>
{backgroundIllustration && <AppLayoutBackgroundImg src={backgroundIllustration} />}
<Topbar parentPages={parentPages} />
</header>
<main><slot /></main>
<Footer withLinks={!hideFooterLinks} />
</Html>
{/* ------------------------------------------- CSS -------------------------------------------- */}
<style>
header {
display: flex;
flex-direction: column;
gap: 1.5em;
}
main {
padding-top: 1em;
padding-bottom: 8em;
flex-grow: 1;
}
</style>