{% if locale === "de" %}{% set localizedDescription = site.description['de'] %}{% endif %}
{% if locale === "en" %}{% set localizedDescription = site.description['en']  %}{% endif %}

<!DOCTYPE html>
<html lang="{{ locale }}" dir="{{ dir }}" class="no-js">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>
    {%- if isHome -%}
    {{ site.title }} · {{ localizedDescription }}
    {%- else -%}
      {{ title }} · {{ site.title }}
    {%- endif -%}
    </title>

    <link rel="canonical" href="{{ site.url }}{{ page.url }}" />

    <script type="module">
      document.documentElement.classList.remove('no-js');
      document.documentElement.classList.add('js');
    </script>

    {% include "scripts.njk" %}
    {% include "styles.njk" %}
    {% include "favicons.njk" %}
    {% include "meta-tags.njk" %}
    {% include "preload.njk" %}
    {% include "robots.njk" %}
  </head>
  <body {% if bodyClass %}class="{{ bodyClass }}"{% endif %} id="top">
    {% include "icon-sprites.njk" %}
    {{ content | safe }}
    <script src="/assets/scripts/main.js" async></script>
  </body>
</html>
