import { html } from 'hono/html';
import { Child, } from 'hono/jsx';

interface SiteData {
    title: string;
    children?: Child;
}

function BaseDocument(props: SiteData) {
    return html`
        <!DOCTYPE html>
        <html lang='en'>
            <head>
                <meta charset="utf-8" />
                <meta name="viewport" content='width=device-width, initial-scale=1' />
                <link rel="stylesheet" href="/static/style.css"/>
                <link rel="preconnect" href="https://fonts.googleapis.com">
                <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
                <link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">
                <script src="https://unpkg.com/htmx.org@2.0.4"></script>
                <title>${props.title}</title>
            </head>
            <body hx-boost="true" class="middle-flex">
                ${props.children}
            </body>
        </html>
`

};

export default BaseDocument;
