mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2026-10-16 11:22:01 -05:00
Versions menu: Add checks for empty downloads/versions
This commit is contained in:
1 parent
cc83bb6b5f
commit
93d997fa0b
1 file changed
+9
-5
@@ -9,22 +9,26 @@
|
||||
</span>
|
||||
<div class="rst-other-versions">
|
||||
{%- block versions %}
|
||||
{%- if versions|length >= 1 %}
|
||||
<dl>
|
||||
<dt>{{ _('Versions') }}</dt>
|
||||
{% for slug, url in versions %}
|
||||
{%- for slug, url in versions %}
|
||||
<dd><a href="{{ url }}">{{ slug }}</a></dd>
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
</dl>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block downloads %}
|
||||
{%- if versions|length >= 1 %}
|
||||
<dl>
|
||||
<dt>{{ _('Downloads') }}</dt>
|
||||
{% for type, url in downloads %}
|
||||
{%- for type, url in downloads %}
|
||||
<dd><a href="{{ url }}">{{ type }}</a></dd>
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
</dl>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
Reference in new issue
Block a user