<!DOCTYPE html>
<html prefix="og: https://ogp.me/ns#" lang="{{lang}}" data-scheme="{{display_scheme}}">
    <head>
        {% if as_html %}
            <title>{{title}}</title>
            <meta charset="UTF-8">
            <meta name="description" content="{{ description }}">
            <meta name="keywords" content="{{keywords}}">
            <meta name="theme-color" content="#A00000">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <meta property="og:description" content="{% block description %}{{ description }}{% end %}">
            <meta property="og:locale" content="de_DE">
            <meta property="og:site_name" content="Asoziale Webseite">
            <meta property="og:title" content="{{title}}">
            <meta property="og:type" content="website">
            <meta property="og:url" content="{{canonical_url}}">
            <meta property="color-scheme" content="{{ {'system': 'light dark', 'dark': 'only dark', 'light': 'only light'}.get(display_scheme) }}">
            <link rel="canonical" href="{{canonical_url}}">
            <link rel="manifest" href="{{fix_static('manifest.json')}}">
            <link rel="author" type="text/plain" href="{{fix_static('/humans.txt')}}">
            <link rel="icon" type="image/png" href="{{fix_static('/favicon.png')}}">
         {# <link rel="icon" type="image/jxl" href="{{fix_static('/favicon.jxl')}}"> #}

            {% if effects and display_theme == "christmas" %}
                <noscript><link rel="preload" type="text/css" href="{{fix_static('css/snow.css')}}"  as="style"></noscript>
                <script type="module" nonce="{{nonce}}">
                    import { createSnow, showSnow } from "{{fix_static('js/snow/snow.js')}}";
                    window.showSnow = showSnow;
                    createSnow();
                </script>
            {% end %}
            {% if compat %}
                <script defer src="{{fix_static('js/vendored/vanilla.js')}}"></script>
            {% end %}
            <script defer type="module" src="{{fix_static('js/utils/utils.js')}}"></script>
            {% if dynload %}
                <script defer type="module" src="{{fix_static('js/utils/dynload.js')}}"></script>
            {% end %}
        {% end %}
        {% block head %} {% end %}
        {% if as_html %}
            <link rel="stylesheet" type="text/css" href="{{fix_static('css/base.css')}}">
        {% end %}
        {% block stylesheets %}{% end %}
    </head>
    <body>
        {% if as_html %}
            {% if effects %}
                {% if display_theme == "christmas" %}
                    <div id="snow" aria-hidden="true">
                    {% for _ in range(200) %}
                        <p>
                    {% end %}
                    </div>
                {% end %}
            {% end %}
            <a href="#main"
               no-dynload
               id="skip-to-content"
               data-elastic-exclude>Skip to content.</a>
            {% include "header.html" %}
        {% end %}

        <main data-elastic-include
              id="main">{% block body %}{{content}}{% end %}</main>

        {% if as_html %}
            {% include "footer.html" %}
        {% end %}

        {% if as_html %}
            {% if c %}<link defer rel="stylesheet" type="text/css" href="{{fix_static('css/comic.css')}}">{% end %}
            <link rel="stylesheet" type="text/css" href="{{fix_static(f'css/themes/{display_theme}.css')}}">
            {% if openmoji and "glyf_colr" in openmoji %}
                <link rel="stylesheet" type="text/css" href="{{fix_static(f'openmoji/font/{openmoji}.css')}}">
            {% end %}
            {% if effects and display_theme == "christmas" %}
                <noscript><link rel="stylesheet" type="text/css" href="{{fix_static('css/snow.css')}}"></noscript>
            {% end %}
            {% if apm_script %}
                <script src="{{fix_url(elastic_rum_url)}}"></script>
                <script>{% raw apm_script %}</script>
            {% end %}
            <link rel="stylesheet" type="text/css" href="{{fix_static('css/tooltip.css')}}">
            <script defer type="module" src="{{fix_static('js/settings/scheme/toggle.js')}}"></script>
        {% end %}
    </body>
</html>
