Skip to content

Commit

Permalink
Extends the menu template for customization in the version selector m…
Browse files Browse the repository at this point in the history
…enu.
  • Loading branch information
devanshshukla99 committed Mar 8, 2024
1 parent 7d6a6f8 commit e1dd25d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion sphinx_versioned/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{% if menu_template %}
{% extends menu_template %}
{% endif %}
{% block injected_code %}
<div class="injected">
<div class="rst-versions {{ 'rst-badge' if floating_badge }}" data-toggle="rst-versions" role="note"
aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
{% block current_version %}
<span class="fa fa-book">&nbsp;&nbsp;Other versions&nbsp;&nbsp;</span>
v: {{ current_version }}
<span class="fa fa-caret-down"></span>
{% endblock %}
</span>
<div class="rst-other-versions">
{% block tags %}
{%- if versions.tags %}
<dl>
<dt>Tags</dt>
Expand All @@ -17,6 +24,8 @@
{%- endfor %}
</dl>
{%- endif %}
{% endblock %}
{% block branches %}
{%- if versions.branches %}
<dl>
<dt>Branches</dt>
Expand All @@ -27,6 +36,8 @@
{%- endfor %}
</dl>
{%- endif %}
{% endblock %}
{% block project_info %}
{%- if project_url %}
<dl>
<dt>Project home</dt>
Expand All @@ -35,6 +46,8 @@
</dd>
</dl>
{%- endif %}
{% endblock %}
{% block searchbar %}
<dl>
<dt>Search</dt>
<dd>
Expand All @@ -47,6 +60,8 @@
</div>
</dd>
</dl>
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}

0 comments on commit e1dd25d

Please sign in to comment.