datatracker/ietf/templates/doc/revisions_list.html
Lars Eggert 81fe7a15cf
fix: add flex-wrap to pagination elements (#3822)
They seem to be one of the only bs5 elements that do not by default wrap, which
causes display issues on narrow screens when there are lots of page elements,
e.g., on http://127.0.0.1:8000/doc/draft-ietf-ipwave-vehicular-networking/

Adding `flex-wrap` (per https://github.com/twbs/bootstrap/issues/23504) makes
this better, but unfortunately doesn't fix it completely, because the layout
still jumps when the window is narrowed by the used. It does fix the issue on
first load and after a reload though.
2022-04-14 15:36:24 -03:00

22 lines
996 B
HTML

{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% origin %}
<label class="my-1 fw-bold">Versions:</label>
<nav class="mb-3">
<ul class="pagination pagination-sm flex-wrap">
{% for rev in revisions %}
<li class="page-item {% if rev == doc.rev %}{% if snapshot or doc.get_state_slug != 'rfc' %}active{% endif %}{% endif %}">
<a class="page-link"
href="{% if snapshot and doc.get_state_slug == 'rfc' %}{% url 'ietf.doc.views_doc.document_main' name=doc.doc.name %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=doc.name %}{% endif %}{% if rev %}{{ rev }}/{% endif %}"
{% if rev != '00' and rev != latest_rev %}rel="nofollow"{% endif %}>
{% if rev %}
{{ rev }}
{% else %}
{{ doc.name }}
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</nav>