45 lines
1.2 KiB
Plaintext
45 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";
|
|
import type { ComponentProps } from "astro/types";
|
|
|
|
interface Props {
|
|
openGraph?: ComponentProps<typeof Html>["openGraph"];
|
|
parentPages?: ParentPage[];
|
|
hideFooterLinks?: boolean;
|
|
backgroundIllustration?: string | undefined;
|
|
}
|
|
|
|
const { openGraph, hideFooterLinks = false, parentPages, backgroundIllustration } = Astro.props;
|
|
---
|
|
|
|
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
|
|
|
<Html openGraph={openGraph}>
|
|
<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>
|