<!doctype html>
<html class="no-js">
  <head>
    {%- block site_meta -%}
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>

    {%- if metatags %}{{ metatags }}{% endif -%}

    {%- block linktags %}
        {%- if hasdoc('about') -%}
          <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
        {%- endif -%}
        {%- if hasdoc('genindex') -%}
          <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
        {%- endif -%}
        {%- if hasdoc('search') -%}
          <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
        {%- endif -%}
        {%- if hasdoc('copyright') -%}
          <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
        {%- endif -%}
        {%- if next -%}
          <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
        {%- endif -%}
        {%- if prev -%}
          <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
        {%- endif -%}
    {%- endblock linktags %}

    {# Favicon #}
    {%- if favicon -%}
      <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
    {%- endif -%}

    {#- Generator banner -#}
    <meta name="generator" content="sphinx-{{ sphinx_version }}, furo {{ furo_version }}"/>

    {%- endblock site_meta -%}

    {#- Site title -#}
    {%- block htmltitle -%}
      {% if pagename == master_doc %}
        <title>{{ _("Home") }} - {{ docstitle }}</title>
      {% else %}
        <title>{{ title }} - {{ docstitle }}</title>
      {% endif %}
    {%- endblock -%}

    {# Custom stylesheets #}
    {%- block extracss -%}
    {%- for path in css_files -%}
    {% if not path.filename.startswith("pygments_dark") -%}
      {{ css_tag(path) }}
    {%- endif %}
    {% endfor -%}
    {%- endblock -%}

    {#- Theme-related stylesheets -#}
    {%- block theme_styles -%}
    <link rel="stylesheet" href="{{ pathto('_static/styles/default.css', 1) }}?{{ furo_asset_hash }}">
    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}">
    <link media="(prefers-color-scheme: dark)" rel="stylesheet" href="{{ pathto('_static/pygments_dark.css', 1) }}">
    {% include "partials/_head_css_variables.html" with context %}
    {%- endblock -%}

    {# Custom JS #}
    {%- block extrajs -%}
    {# This is *exactly* how `basic` handles this file. #}
    <script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
    {%- for path in script_files -%}
      {{ js_tag(path) }}
    {% endfor -%}
    {%- endblock -%}

    {# Theme-related JavaScript libraries #}
    {%- block theme_scripts -%}
    <script src="{{ pathto('_static/scripts/main.js', 1) }}?{{ furo_asset_hash }}"></script>
    {%- endblock -%}

    {#- Custom front matter #}
    {%- block extrahead -%}{%- endblock -%}
  </head>
  <body dir="{{ direction }}">
    {% block body %}{% endblock %}
  </body>
</html>
