<!-- adapted from sphinx_rtd_theme versions.html -->

<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"> Versions</span>
        v: {{ building_version }}
        <span class="fa fa-caret-down"></span>
    </span>
    <div class="rst-other-versions">
        <dl>
            <dt>Latest release</dt>
            {% if building_version == latest_release %}
                <dd><a href="{{ pagename }}.html">{{ latest_release }}</a></dd>
            {% else %}
                <dd><a href="{{ latest_release }}/{{ pagename }}.html">{{ latest_release }}</a></dd>
            {% endif %}
        </dl>
        <dl>
            <dt>Development version</dt>
            {% if building_version == latest_release %}
                <dd><a href="../{{ pagename }}.html">{{ current_branch }}</a></dd>
            {% else %}
                <dd><a href="{{ pagename }}.html">{{ current_branch }}</a></dd>
            {% endif %}
        </dl>
    </div>
</div>
