about summary refs log tree commit diff
path: root/src/librustdoc/html/templates/page.html
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-09-18 17:48:18 -0700
committerMichael Howell <michael@notriddle.com>2023-10-08 20:17:53 -0700
commit6d6fa792fffa6e22eec1b30cedee6e8306d0df64 (patch)
tree293ffd439cbf85994b1c8f8d912c008e66c8a59b /src/librustdoc/html/templates/page.html
parent957c5db6be09f8def3f7a8297577a6d42e02f7c0 (diff)
downloadrust-6d6fa792fffa6e22eec1b30cedee6e8306d0df64.tar.gz
rust-6d6fa792fffa6e22eec1b30cedee6e8306d0df64.zip
rustdoc: clean up the layout for annotated version numbers
This should result in a layout for the actual standard library,
when built on CI, that looks like this:

    _____
   /     \ std
   |  R  | 1.74.0-nightly
   \_____/

   (203c57dbe 2023-09-17)

Having the whole version as one string caused it to flex wrap,
because the sidebar isn't wide enough to fit the whole thing.
Diffstat (limited to 'src/librustdoc/html/templates/page.html')
-rw-r--r--src/librustdoc/html/templates/page.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html
index 0987010b940..4a7c06e63c9 100644
--- a/src/librustdoc/html/templates/page.html
+++ b/src/librustdoc/html/templates/page.html
@@ -101,8 +101,11 @@
                 {% if !layout.krate_version.is_empty() %}
                     <span class="version">{{+ layout.krate_version}}</span>
                 {% endif %}
-            </h2>
-        </div>
+            </h2> {# #}
+        </div> {# #}
+        {% if !layout.krate_version_extra.is_empty() %}
+        <div class="version">{{+ layout.krate_version_extra}}</div> {# #}
+        {% endif %}
         {% endif %}
         {{ sidebar|safe }}
     </nav> {# #}