---
import '@styles/global.css'

import Navbar from '@components/Navbar.astro';
import Footer from '@components/Footer.astro';

const pageTitle = Astro.props.title ? `${Astro.props.title} - Corwin Perren` : "Corwin Perren";
---
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <link rel="icon" href="/favicon.svg" type="image/svg+xml"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>{pageTitle}</title>

    <script is:inline type="module" src="/src/scripts/main.js"></script>

</head>
<body class="bg-black text-white">
<Navbar/>
<main class="mx-6 mt-6 mb-14">
    {(Astro.props.title) && (
            <h1 class="font-extrabold md:text-3xl md:mb-6">{Astro.props.title}</h1>
    )}
    <slot/>
</main>
<Footer/>
</body>
</html>

