1
0
Fork 0
jinjax/docs/theme/PrevNext.jinja

27 lines
701 B
Text
Raw Normal View History

{#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>