{# Allow extenders to pass through variables #}
{% block variable_wormhole %}
{% set title = "NO TITLE SET" %}
{% set description = "" %}
{% set is_article = false %}
{% set feature_flags = [] %}
{% set redirect_target = "" %}
{% endblock variable_wormhole %}

<!DOCTYPE html>
<html lang="en">

<head>
    {# Page metadata #}
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" type="image/jpg" href="{{config.extra.profile_photo}}" />
    {% include "components/metadata/advertise-rss.html" %}
    {% include "components/metadata/opengraph.html" %}

    {# Redirect support #}
    {% if redirect_target != "" %}
    <meta http-equiv="refresh" content="0; url={{redirect_target}}" />
    {% endif %}

    {# Page title #}
    <title>{{title}} | {{config.title}}</title>

    {# Site-wide styles #}
    <link rel="stylesheet" href="/global.css">

    {# Less important styles #}
    <link rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown-light.css"
        integrity="sha512-1d9gwwC3dNW3O+lGwY8zTQrh08a41Ejci46DdzY1aQbqi/7Qr8Asp4ycWPsoD52tKXKrgu8h/lSpig1aAkvlMw=="
        crossorigin="anonymous" referrerpolicy="no-referrer" lazyload />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    <link rel="stylesheet" href="/styles/typography.css">

    {# Component styles #}
    {% block component_styles %}
    {% endblock component_styles %}

    {# Enable features #}
    {% include "components/metadata/page-features.html" %}
</head>

<body>

    {# The whole page #}
    <div class="page">

        {# Allow pages to override the content before the navbar #}
        {% block page_start %}{% endblock page_start %}

        {# Navbar #}
        <div class="container">
            {% include "components/navbar.html" %}
        </div>

        {# Actual content #}
        {% if redirect_target %}
        <div class="container" style="text-align:center;">
            <h2>Redirection Notice</h2>
            <p>
                You are being redirected to another page.<br>
                Click <a href="{{redirect_target}}">here</a> if this does not happen automatically.
            </p>
        </div>
        {% else %}
        <article id="content" class="container markdown-body">
            {% block content %}{% endblock content %}
        </article>
        {% endif %}

        {# Footer #}
        {% include "components/footer.html" %}
    </div>

    {# External scripts #}
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
        crossorigin="anonymous"></script>

    {% include "components/metadata/analytics.html" %}
</body>

</html>