<!doctype html>{% load i18n staticfiles cms_tags sekizai_tags allink_google_tag_manager_tags allink_helpers allink_image_tags allink_meta_tags inline_static_tags %}
{% load render_bundle get_files from webpack_loader %}

<html lang="{{ LANGUAGE_CODE }}" class="base-root no-js {% block html_additional_css_classes %}{% endblock html_additional_css_classes %}" {% block html_additional_attributes %}{% endblock html_additional_attributes %}>
<head>
    <!--

               _ _ _       _
              | | (_)     | |
          __ _| | |_ _ __ | | __
         / _` | | | | '_ \| |/ /
        | (_| | | | | | | |   <
         \__,_|_|_|_|_| |_|_|\_\

        Die Branding- und Webagentur aus Zürich.

        allink.ch

    -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <meta name="format-detection" content="telephone=no" />{% comment %} Removing ugly phone number links on Internet Explorer: https://msdn.microsoft.com/en-us/library/dn265018(v=vs.85).aspx {% endcomment %}

    {# META / OpenGraph #}
    {% block meta_tags %}
        {% render_meta_og %}
    {% endblock meta_tags %}

    {# Favicons #}
    {% block favicons %}
        {% include 'includes/favicons.html' %}
    {% endblock favicons %}

    {# css #}
    {% block webpack_css %}
        {% if not debug %}
            {# critical css #}
            <style type="text/css">
                {% inline_style 'build/critical.css' %}
            </style>
        {% endif %}
        {% comment %}
            all other css
            Experimental, not supported by all browsers. Load it normally for unsupported browsers and to call onload https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content
        {% endcomment %}
        {% get_files 'app' 'css' as app_css_chunks %}
        <link href="{{ app_css_chunks.0.publicPath }}" rel="preload" as="style">
        <link rel="stylesheet" href="{{ app_css_chunks.0.publicPath }}">
    {% endblock webpack_css %}
    {% render_block "css" %}

    {# Load external JavaScript #}
    {# Included from: https://cdnjs.com/#}
    <script defer src="//cdnjs.cloudflare.com/ajax/libs/picturefill/3.0.3/picturefill.min.js"></script>

    {% block webpack_js %}
        {% get_files 'app' 'js' as app_js_chunks %}
        <script defer src="{{ app_js_chunks.0.publicPath }}"></script>
    {% endblock webpack_js %}

    {# Optional: Extra Header Block#}
    {% block extrahead %}{% endblock extrahead %}

    {{ ALDRYN_SNAKE.render_head }}

    {# Google Tag Manager (hide when in edit mode) #}
    {% if not request.toolbar.show_toolbar %}
        {% google_tag_manager %}
    {% endif %}
</head>

<body id="page-top" class="noscript lang-{{ LANGUAGE_CODE }} {% block body_class %}tpl-root{% endblock %}" {% block body_additional_attributes %}{% endblock body_additional_attributes %}>
    {# Google Tag Manager (noscript part must be in body) #}
    {% if not request.toolbar.show_toolbar %}
        <noscript><iframe src="//www.googletagmanager.com/ns.html?id={% settings_value 'GOOGLE_TAG_MANAGER_ID' %}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    {% endif %}

    {% block skip_links %}
        {# Accessibility: Make sure the anchor IDs are up-to-date #}
    {% endblock skip_links %}

    <span id="current-page-id" style="display: none;" data-current-page="{{ request.current_page.pk }}"></span>

    {# The Django CMS Toolbar#}
    {% cms_toolbar %}

    {# The main content block#}
    {% block body_content %}{% endblock body_content %}

    {# Load our JavaScript#}
    {% block google_map_api_key %}
        <script>
            var GOOGLE_MAP_API_KEY = '{% settings_value "GOOGLE_MAP_API_KEY" %}';
        </script>
    {% endblock google_map_api_key %}

    {% render_block "js" %}

    {# Optional: Additional Scripts#}

    {# javascript translations #}
    <script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>

    {% render_block "extrafoot" %}
    {% block extrafoot %}{% endblock extrafoot %}

    {{ ALDRYN_SNAKE.render_tail }}

    {# Google Analytics Code#}
    {% block google_analytics %}
        {% include "includes/analytics.html" %}
    {% endblock google_analytics %}

    {# Required! The .site-overlay can be used in various contexts (such as 'softpage' oder other modals)#}
    {% block site_overlay %}
        <div class="site-overlay"></div>
    {% endblock site_overlay %}

    {# Required! For the fullscreen swiper gallery #}
    {% block fullscreen_gallery_markup %}
        <div class="swiper-fullscreen-container">
            <a href="#" class="swiper-button-fullscreen-close tingle-modal__close" data-softpage-disabled data-close-swiper-fullscreen>
                <i class="sr-only" lang="en">
                    {% trans "Close" %}
                </i>
            </a>
            <div class="swiper-fullscreen"></div>
        </div>
    {% endblock fullscreen_gallery_markup %}

    {# Browser Check Overlay #}
    {% block browser_check %}
        {% include "includes/browser-check.html" %}
    {% endblock browser_check %}

</body>
</html>
