1
0
Fork 0
jinjax/docs/theme/PrevNext.jinja
Daniel Baumann 76fe8c2886
Merging upstream version 0.46.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 18:42:39 +01:00

26 lines
701 B
Django/Jinja

{#def curr, prev, next #}
<nav {{ attrs.render(class="cd-prevnext", data_component="PrevNext") }}>
{% if prev.url -%}
<a href="{{ prev.url }}" class="prev">
<i>&larr;</i>
<div>
<div class="section">
{{ prev.section or "Previous" if prev.section != curr.section else "Previous" }}
</div>
<div class="title">{{ prev.title }}</div>
</div>
</a>
{%- endif %}
{% if next.url -%}
<a href="{{ next.url }}" class="next">
<div>
<div class="section">
{{ next.section or "Next" if next.section != curr.section else "Next" }}
</div>
<div class="title">{{ next.title }}</div>
</div>
<i>&rarr;</i>
</a>
{%- endif %}
</nav>