---
import '../style.css'

import Header from '../components/Header.astro'

const { title, courses, selectedCourseLabel } = Astro.props
---

<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="icon" href="/favicon.svg" type="image/svg+xml" />

        <link
            rel="stylesheet"
            href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"
            integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+"
            crossorigin="anonymous"
        />

        <script>
            // @ts-ignore
            window.goatcounter = {
                path: function (p) {
                    return location.host + p
                },
            }
        </script>
        <script
            data-goatcounter="https://analytics.phc.dm.unipi.it/count"
            async
            src="//analytics.phc.dm.unipi.it/count.js"></script>

        <title>{title}</title>
    </head>
    <body>
        <Header courses={courses} selectedCourseLabel={selectedCourseLabel} />
        <main>
            <slot />
        </main>
        <footer>
            <p>
                Sito creato con <code>&lt;3</code> dal
                <a class="logo" href="https://phc.dm.unipi.it/">
                    <img src="/logo-phc.svg" alt="PHC" srcset="" />
                </a>
            </p>
        </footer>
    </body>
</html>
