<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>{% block title %}{{ PROJECT_TITLE }}{% if PROJECT_SUBTITLE %} {{ PROJECT_SUBTITLE }}{% endif %}{% endblock %}</title>
  {% for css in STYLESHEETS %}
  <link rel="stylesheet" href="{{ css|format_url|e }}" />
  {% endfor %}
  {% if FAVICON %}
  <link rel="icon" href="{{ FAVICON[0]|format_url|e }}" type="{{ FAVICON[1] }}" />
  {% endif %}
  {% if not SEARCH_DISABLED and SEARCH_BASE_URL %}
  <link rel="search" type="application/opensearchdescription+xml" href="opensearch.xml" title="Search {{ PROJECT_TITLE }} documentation" />
  {% endif %}
  {% block header_links %}
  {% endblock %}
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  {% if THEME_COLOR %}
  <meta name="theme-color" content="{{ THEME_COLOR }}" />
  {% endif %}
  {% if HTML_HEADER %}
  {{ HTML_HEADER|rtrim|indent(2) }}
  {% endif %}
</head>
<body>
<header><nav id="navigation">
  <div class="m-container">
    <div class="m-row">
      {% if MAIN_PROJECT_URL and PROJECT_SUBTITLE %}
      <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
        <a href="{{ MAIN_PROJECT_URL }}">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|format_url|e }}" alt="" />{% endif %}{{ PROJECT_TITLE }}</a> <span class="m-breadcrumb">|</span> <a href="{{ 'index'|path_to_url }}" class="m-thin">{{ PROJECT_SUBTITLE }}</a>
      </span>
      {% else %}
      <a href="{{ 'index'|path_to_url }}" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|format_url|e }}" alt="" />{% endif %}{{ PROJECT_TITLE }}{% if PROJECT_SUBTITLE %} <span class="m-thin">{{ PROJECT_SUBTITLE }}</span>{% endif %}</a>
      {% endif %}
      {% if LINKS_NAVBAR1 or LINKS_NAVBAR2 or not SEARCH_DISABLED %}
      <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
        {% if not SEARCH_DISABLED %}
        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
          <path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
        </svg></a>
        {% endif %}
        <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
        <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
      </div>
      <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
        <div class="m-row">
          <ol class="{% if M_LINKS_NAVBAR2 %}m-col-t-6{% else %}m-col-t-12{% endif %} m-col-m-none">
            {% for title, path, sub in LINKS_NAVBAR1 %}
            {% if not sub %}
            <li><a href="{{ path|path_to_url }}"{% if (page and page.path == path) or navbar_current == path %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
            {% else %}
            <li>
              <a href="{{ path|path_to_url }}"{% if (page and page.path == path) or navbar_current == path %} id="m-navbar-current"{% endif %}>{{ title }}</a>
              <ol>
                {% for title, path in sub %}
                <li><a href="{{ path|path_to_url }}"{% if (page and page.path == path) or navbar_current == path %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
                {% endfor %}
              </ol>
            </li>
            {% endif %}
            {% endfor %}
          </ol>
          {% if LINKS_NAVBAR2 or not SEARCH_DISABLED %}
          {% set start = LINKS_NAVBAR1|length + 1 %}
          <ol class="m-col-t-6 m-col-m-none" start="{{ start }}">
            {% for title, path, sub in LINKS_NAVBAR2 %}
            {% if not sub %}
            <li><a href="{{ path|path_to_url }}"{% if (page and page.path == path) or navbar_current == path %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
            {% else %}
            <li>
              <a href="{{ path|path_to_url }}"{% if (page and page.path == path) or navbar_current == path %} id="m-navbar-current"{% endif %}>{{ title }}</a>
              <ol>
                {% for title, path in sub %}
                <li><a href="{{ path|path_to_url }}"{% if (page and page.path == path) or navbar_current == path %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
                {% endfor %}
              </ol>
            </li>
            {% endif %}
            {% endfor %}
            {% if not SEARCH_DISABLED %}
            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
              <use href="#m-doc-search-icon-path" />
            </svg></a></li>
            {% endif %}
          </ol>
          {% endif %}
        </div>
      </div>
      {% endif %}
    </div>
  </div>
</nav></header>
<main><article>
  <div class="m-container m-container-inflatable">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        {% if PAGE_HEADER %}
        {{ PAGE_HEADER|render_rst|replace('{url}', URL) }}
        {% endif %}
{% block main %}
{% endblock %}
      </div>
    </div>
  </div>
</article></main>
{% if not SEARCH_DISABLED %}
<div class="m-doc-search" id="search">
  <a href="#!" onclick="return hideSearch()"></a>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-m-8 m-push-m-2">
        <div class="m-doc-search-header m-text m-small">
          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
          <div id="search-symbolcount">&hellip;</div>
        </div>
        <div class="m-doc-search-content">
          <form{% if SEARCH_BASE_URL %} action="{{ SEARCH_BASE_URL }}#search"{% endif %}>
            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
          </form>
          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.{% if SEARCH_EXTERNAL_URL %} Enable it or <a href="{{ SEARCH_EXTERNAL_URL|replace('{query}', '') }}">use an external search engine</a>.{% endif %}</noscript>
          <div id="search-help" class="m-text m-dim m-text-center">
            {{ SEARCH_HELP|render_rst|rtrim|indent(12) }}
          </div>
          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.{% if SEARCH_EXTERNAL_URL %}<br />Maybe try a full-text <a href="#" id="search-external" data-search-engine="{{ SEARCH_EXTERNAL_URL }}">search with external engine</a>?{% endif %}</div>
          <ul id="search-results"></ul>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="{{ 'search.js'|format_url|e }}"></script>
{% if SEARCH_DOWNLOAD_BINARY %}
<script>
  Search.download({% if SEARCH_DOWNLOAD_BINARY is string %}'{{ SEARCH_DOWNLOAD_BINARY.format(SEARCHDATA_FORMAT_VERSION)|format_url|e }}'{% else %}window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/') + 1) + '{{ SEARCH_FILENAME_PREFIX }}-v{{ SEARCHDATA_FORMAT_VERSION }}.bin'{% endif %});
</script>
{% else %}
<script src="{{ '{}-v{}.js'.format(SEARCH_FILENAME_PREFIX, SEARCHDATA_FORMAT_VERSION)|format_url|e }}" async="async"></script>
{% endif %}
{% endif %}
{% if FINE_PRINT %}
<footer><nav>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        {% if FINE_PRINT == '[default]' %}
        <p>{{ PROJECT_TITLE }}{% if PROJECT_SUBTITLE %} {{ PROJECT_SUBTITLE }}{% endif %}. Created with <a href="https://mcss.mosra.cz/documentation/python/">m.css Python doc generator</a>.</p>
        {% else %}
        {{ FINE_PRINT|render_rst|rtrim|indent(8) }}
        {% endif %}
      </div>
    </div>
  </div>
</nav></footer>
{% endif %}
</body>
</html>
{#- sanity checks for variables that should be always defined -#}
{% if URL is not defined %}{{ URL.is_not_defined_the_script_is_broken }}{% endif %}
{% if SEARCHDATA_FORMAT_VERSION is not defined %}{{ SEARCHDATA_FORMAT_VERSION.is_not_defined_the_script_is_broken }}{% endif %}
