Skip to content

Commit 15a1700

Browse files
committed
Build: highlight the name of the version
I find pretty hard to know what's the version of the current build on the build details' page, so I want to make it more visible. I'm following the same style/pattern we are following for the build id and I like it.
1 parent 2ca4b1f commit 15a1700

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

readthedocsext/theme/templates/builds/includes/build_name.html

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,34 @@
3838
{# When not a page title, treat the entire breadcrumb as a link to the build #}
3939
{% if not is_page_title %}<a href="{{ build.get_absolute_url }}">{% endif %}
4040
<span class="ui {% if is_page_title %}large{% endif %} breadcrumb">
41+
<span class="section">
42+
<span class="ui grey text">
43+
{# When used a a page title, link the sections independently #}
44+
{% if build.is_external %}
45+
{{ build.external_version_name | lower | capfirst }}
46+
{{ build.get_version_name }}
47+
{% else %}
48+
{# Translators: this renders with the version name, example "Version latest" #}
49+
{% blocktrans trimmed %}
50+
Versions
51+
{% endblocktrans %}
52+
{% endif %}
53+
</span>
54+
</span>
55+
4156
<span class="section">
42-
{# When used a a page title, link the sections independently #}
43-
{% if is_page_title %}
57+
<span class="divider">/</span>
58+
{% if is_page_title %}
4459
<a href="{% url "projects_detail" build.project.slug %}?slug={{ build.get_version_slug }}">
45-
{% endif %}
60+
{% endif %}
4661

47-
{% if build.is_external %}
48-
{{ build.external_version_name | lower | capfirst }}
49-
{{ build.get_version_name }}
50-
{% else %}
51-
{# Translators: this renders with the version name, example "Version latest" #}
52-
{% blocktrans trimmed with version_name=build.get_version_name %}
53-
Version {{ version_name }}
54-
{% endblocktrans %}
55-
{% endif %}
62+
{{ build.get_version_name }}
5663

57-
{% if is_page_title %}
64+
{% if is_page_title %}
5865
</a>
59-
{% endif %}
66+
{% endif %}
6067
</span>
68+
6169
{% if is_page_title %}
6270
{# When used as a page title, show a section link for the filtered build list #}
6371
<span class="divider">/</span>

0 commit comments

Comments
 (0)