<a class="toggle-sidenav d-block d-md-none" href="#"
  ><i class="icon-close fa fa-fw fa-arrow-left"></i
  ><i class="icon-open fa fa-fw fa-arrow-right"></i
></a>
<div role="complementary" class="sidenav col-4 col-xl-3 p-0 border-right">
  <h3 class="pt-5 px-5">
    <a href="{{ pathto(master_doc) }}">
      {%- if theme_nengo_logo %}
      <img
        class="img-fluid documentation-image"
        src="https://www.nengo.ai/design/_images/{{ theme_nengo_logo }}"
        alt="{{ project }}"
      />
      {%- else %}
      {{ project }}
      {%- endif %}
    </a>
  </h3>
  {% if building_version %}
  <form class="px-5 pb-5 mb-0 mt-3 border-bottom">
    <div class="form-group">
      <label class="text-gray">Version:</label>
      <select class="custom-select" onchange="switchVersion(this);">
        {% set prefix = pagename
           | list
           | select("equalto", "/")
           | map("replace", "/", "../")
           | join("") %}
        {% if building_version == "latest" %}
        <option selected>latest</option>
        {% else %}
        <option value="{{ prefix }}../{{ pagename }}.html">latest</option>
        {% endif %}
        {% for release in releases.split(",") | sort(True) %}
          {% if building_version == release %}
        <option selected>{{ release }}</option>
          {% elif building_version == "latest" %}
        <option value="{{ prefix }}{{ release }}/{{ pagename }}.html">
          {{ release }}
        </option>
          {% else %}
        <option value="{{ prefix }}../{{ release }}/{{ pagename }}.html">
          {{ release }}
        </option>
          {% endif %}
        {% endfor %}
      </select>
    </div>
  </form>
  {% endif %}
  <div class="p-5 toctree">
    {{ toc }}
  </div>
  {%- include "searchbox.html" -%}
</div>
