{%- extends "!layout.html" %}

{#
Taken from:
https://github.com/readthedocs/sphinx_rtd_theme/blob/1d856256676d2b801a12c30e4a849c5abc466da9/docs/_templates/layout.html
#}

{% block footer %}
  <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
    <span class="rst-current-version" data-toggle="rst-current-version">
      <span class="fa fa-book"> {{project}}</span>
        {{version}} | {{ current_lang }}
      <span class="fa fa-caret-down"></span>
    </span>
    <div class="rst-other-versions">
      <dl>
        <dt>Versions</dt>
        {% for v in all_versions %}
          <dd>
            <a href="/{{ current_lang }}/{{ v }}/{{ i18n_pagenames[current_lang][pagename] }}.html">
              {% if v == version %}
              <span class="rst-current-version">
                {{ v }}
              </span>
              {% else %}
                {{ v }}
              {% endif %}
            </a>
          </dd>
        {% endfor %}
        <dt>Languages</dt>
        {% for l in langs %}
          <dd>
            <a href="/{{ l }}/{{ version }}/{{ i18n_pagenames[l][pagename] }}.html">
              {% if l == current_lang %}
              <span class="rst-current-version">
                {{ l }}
              </span>
              {% else %}
                {{ l }}
              {% endif %}
            </a>
          </dd>
        {% endfor %}
        <dt>Downloads</dt>
        <dd>
          <a href="/{{ current_lang }}/{{ version }}/$PROJECT_UC.pdf">
            PDF
          </a>
        </dd>
        <dd>
          <a href="/{{ current_lang }}/{{ version }}/$PROJECT_UC.epub">
            EPUB
          </a>
        </dd>
      </dl>
    </div>
  </div>
{% endblock %}
