{% extends "solara.html.j2" %}
{% block header %}
    {% if production %}
    <link rel="canonical" href="https://solara.dev{{path}}">
    {% endif %}
    {#
    <!-- not using this right now, leaving it here for reference -->
    <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=IBM+Plex+Mono&family=Inter:wght@700&family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
    #}

    <!-- Google Analytics -->
    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    _solara_skip_use_ga = (window.location.hostname == 'localhost') || (window.location.hostname == '0.0.0.0');
    if(!_solara_skip_use_ga) {
        ga('create', 'UA-240047566-1', 'auto');
        ga('send', 'pageview');
    }
    </script>
    <!-- End Google Analytics -->
    {{ super() }}
    <script>
    if(!_solara_skip_use_ga) {
        // for client side routing
        window.addEventListener('solara.router', function(event) {
            ga('send', 'pageview', window.location.pathname);
        });
    }
    </script>
{% endblock %}
