{% if versions %}
<nav class="bd-links bd-docs-nav">
    <div class="bd-toc-item navbar-nav">
        <ul class="nav bd-sidenav">
      <li class="toctree-l1 has-children">
        <details>
          <summary>
            <p class="caption" aria-level="2" role="heading" style="text-align: center;">
              <span class="fa fa-book"></span>
             <b>{% if current_version.name == "main" %}latest{% else %}{{current_version.name}}{% endif %}</b>
            </p>
          </summary>
          <ul>
            {%- for item in versions.branches %}
            <li class="toctree-l2 {% if item == current_version %}current{% endif %} "><a class="reference" href="{{item.url}}">{% if item.name == "main" %}latest{% else %}{{item.name}}{% endif %}</a></li>
            {%- endfor %}
            {%- for item in versions.tags|reverse %}
            <li class="toctree-l2 {% if item == current_version %}current{% endif %} "><a class="reference" href="{{item.url}}">{% if item.name == "main" %}latest{% else %}{{item.name}}{% endif %}</a></li>
            {%- endfor %}
          </ul>
        </details>
      </li>
    </ul>
    </div>
</nav>
{% endif %}
