---
import Navbar from "../components/Navbar.astro";
import Footer from "../components/Footer.astro";
import "../styles/hamburgers.scss";
import "../styles/global.scss";
import "iconify-icon";
import "@fontsource-variable/epilogue";
const { title, description, keywords, url, image } = Astro.props;
---

<html>
    <head>
        <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"
        ></script>
        <script
            src="https://cdn.jsdelivr.net/npm/iconify-icon@2.0.0/dist/iconify-icon.min.js"
        ></script>
        <script
            src="https://code.iconify.design/iconify-icon/1.0.8/iconify-icon.min.js"
        ></script>
        <script is:inline src="https://apis.google.com/js/api.js"></script>
        <script
            is:inline
            src="https://cdn.jsdelivr.net/npm/moment@2/moment.min.js"></script>
        <script
            is:inline
            src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"
        ></script>
    </head>

    <body class="">
        <Navbar />
        <div class="min-h-screen">
            <slot />
        </div>
        <Footer />
        <script>
            declare global {
                interface Window {
                    netlifyIdentity: any;
                }
            }

            if (window.netlifyIdentity) {
                window.netlifyIdentity.on("init", (user: any) => {
                    if (!user) {
                        window.netlifyIdentity.on("login", () => {
                            document.location.href = "/admin/";
                        });
                    }
                });
            }
        </script>
    </body>
</html>
