54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
---
|
|
import Html from "./components/Html.astro";
|
|
import Topbar from "./components/Topbar/Topbar.astro";
|
|
import Footer from "./components/Footer.astro";
|
|
import type { EndpointSource } 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?: EndpointSource[];
|
|
backgroundImage?: ComponentProps<typeof AppLayoutBackgroundImg>["img"] | undefined;
|
|
hideFooterLinks?: boolean;
|
|
hideHomeButton?: boolean;
|
|
class?: string | undefined;
|
|
}
|
|
|
|
const {
|
|
openGraph,
|
|
parentPages,
|
|
backgroundImage,
|
|
hideFooterLinks = false,
|
|
hideHomeButton = false,
|
|
...otherProps
|
|
} = Astro.props;
|
|
---
|
|
|
|
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
|
|
|
<Html openGraph={openGraph}>
|
|
{backgroundImage && <AppLayoutBackgroundImg img={backgroundImage} />}
|
|
<header>
|
|
<Topbar parentPages={parentPages} hideHomeButton={hideHomeButton} />
|
|
</header>
|
|
<main {...otherProps.class ? otherProps : {}}><slot /></main>
|
|
<Footer withLinks={!hideFooterLinks} />
|
|
</Html>
|
|
|
|
{/* ------------------------------------------- CSS -------------------------------------------- */}
|
|
|
|
<style>
|
|
header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5em;
|
|
}
|
|
|
|
main {
|
|
padding-top: 1.5em;
|
|
padding-bottom: 8em;
|
|
flex-grow: 1;
|
|
}
|
|
</style>
|