{% load static wagtailuserbar wagtailcore_tags wagtailimages_tags navigation_tags util_tags hijack_tags %}<!doctype html>
<html class="no-js" lang="en">
    <head>
        {# TODO fallbacks if page is not defined e.g. for 404 page #}
        <meta charset="utf-8" />
        <title>{% block title_prefix %}{{ TITLE_PREFIX }}{% endblock %}{% block title %}{% if page.seo_title %}{{ page.seo_title }}{% else %}{{ page.title }}{% endif %}{% endblock %}{% block title_suffix %}{{ TITLE_SUFFIX }}{% endblock %}</title>
        <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% else %}{{ page.listing_summary }}{% endif %}" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />

        {% if GOOGLE_TAG_MANAGER_ID %}
            {# To enable GTM code you need to specify GOOGLE_TAG_MANAGER_ID in production.py or in local.py #}
            <!-- Google Tag Manager -->
            <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
            new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
            j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
            'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
            })(window,document,'script','dataLayer','{{ GOOGLE_TAG_MANAGER_ID|escapejs }}');</script>
            <!-- End Google Tag Manager -->
        {% endif %}

        <!-- favicons -->
        {% comment %}
            Generate favicons by http://realfavicongenerator.net using the following path: settings.STATIC_URL + img/favicons.
            Then favicon.ico should be copied to a directory called "public" in the application root and puppet does some magic to serve it up at the site root.
        {% endcomment %}
        <link rel="icon" sizes="144x144" href="{% static 'images/favicons/android-chrome-144.png' %}">
        <link rel="icon" type="image/png" sizes="16x16" href="{% static 'images/favicons/favicon-16.png' %}">
        <link rel="icon" type="image/png" sizes="32x32" href="{% static 'images/favicons/favicon-32.png' %}">
        <link rel="apple-touch-icon" sizes="76x76" href="{% static 'images/favicons/apple-icon-76.png' %}">
        <link rel="apple-touch-icon" sizes="120x120" href="{% static 'images/favicons/apple-icon-120.png' %}">
        <link rel="apple-touch-icon" sizes="152x152" href="{% static 'images/favicons/apple-icon-152.png' %}">
        <link rel="apple-touch-icon" sizes="180x180" href="{% static 'images/favicons/apple-icon-180.png' %}">
        <link rel="manifest" href="{% static 'images/favicons/manifest.json' %}">
        <meta name="msapplication-TileColor" content="#da532c">
        <meta name="msapplication-TileImage" content="{% static 'images/favicons/mstile-150.png' %}">
        <meta name="theme-color" content="#ffffff">
        <link rel="mask-icon" href="{% static 'images/favicons/safari-pinned-tab.svg' %}" color="#5bbad5">

        {% block extra_css %}{% endblock %}
        <link rel="stylesheet" type="text/css" href="{% static 'css/apply/main.css' %}">
        {# Hijack styling #}
        <link rel="stylesheet" type="text/css" href="{% static 'hijack/hijack-styles.css' %}" />
    </head>

    <body class="{% block body_class %}light-grey-bg template-{{ page.get_verbose_name|slugify }}{% endblock %}">
        {% hijack_notification %}

        {% if GOOGLE_TAG_MANAGER_ID %}
            {# To enable GTM code you need to specify GOOGLE_TAG_MANAGER_ID in production.py or in local.py #}
            <!-- Google Tag Manager (noscript) -->
            <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER_ID|escapejs }}"
            height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
            <!-- End Google Tag Manager (noscript) -->
        {% endif %}

        {% include "includes/sprites.html" %}

        {% wagtailuserbar %}

        {% include 'includes/messages.html' %}
        <header class="header">

            <div class="header__inner wrapper wrapper--large">
                <a href="{% slugurl 'home' %}" aria-label="Home link">
                    <svg class="header__logo header__logo--desktop"><use xlink:href="#logo-desktop--dark"></use></svg>
                    <svg class="header__logo header__logo--mobile"><use xlink:href="#logo-mobile"></use></svg>
                </a>

                <div class="header__inner header__inner--mobile-buttons">
                    <button class="button button--left-space js-mobile-menu-toggle" aria-haspopup="true">
                        <svg class="icon icon--mobile-menu"><use xlink:href="#mobile-menu-toggle"></use></svg>
                    </button>
                </div>

                <section class="header__menus header__menus--desktop">
                    {% include "navigation/primarynav-apply.html" %}
                </section>

                <section class="header__menus header__menus--mobile">
                    <div class="header__inner header__inner--menu-open">
                        <a href="{% slugurl 'home' %}" aria-label="Home link">
                            <svg class="header__logo header__logo--mobile"><use xlink:href="#logo-mobile"></use></svg>
                        </a>
                        <div class="header__inner header__inner--mobile-buttons">
                            <button class="button button--left-space js-mobile-menu-close">
                                <svg class="header__icon header__icon--cross icon icon--mobile-menu"><use xlink:href="#cross"></use></svg>
                            </button>
                        </div>
                    </div>
                    {% include "navigation/primarynav-apply.html" %}
                    <a href="{% url 'users:account' %}" class="link link--button-transparent link--mobile-standout">
                        <svg class="icon"><use xlink:href="#person-icon"></use></svg>
                        {{ request.user }}
                    </a>
                    <a href="{% url 'users:logout' %}" class="link link--button-transparent link--mobile-standout">Logout</a>
                </section>

                <div class="header__button-container">
                    <a href="{% url 'users:account' %}" class="button button--transparent button--narrow button--contains-icons">
                        <svg class="icon icon--person"><use xlink:href="#person-icon"></use></svg>
                        {{ request.user }}
                    </a>
                    <a href="{% url 'users:logout' %}" class="button button--transparent button--narrow">
                        Log Out
                    </a>
                </div>
            </div>
        </header>

        <main class="wrapper wrapper--large wrapper--main">
            {% block content %}{% endblock %}
        </main>

        <footer class="footer"></footer>

        <script type="text/javascript" src="{% static 'js/main.js' %}"></script>
        {% block extra_js %}{% endblock %}
    </body>
</html>