blog/themes/cmd/layout/includes/paginator.njk

24 lines
655 B
Text
Raw Normal View History

{% macro Paginiation() %}
<ul class="pagination center">
{% if page.prev %}
<li class="waves-effect">
<a href="{{ page.prev_link }}">
<i class="mdi mdi-chevron-left"></i>
</a>
</li>
{% endif %}
{% for n in range(1, page.total, 1) %}
<li class="{{ 'active' if page.current == n else 'waves-effect' }}">
<a href="{{ url_for('page/'+n+'/') }}">{{ n }}</a>
</li>
{% endfor %}
{% if page.next %}
<li class="waves-effect">
<a href="{{ page.next_link }}">
<i class="mdi mdi-chevron-right"></i>
</a>
</li>
{% endif %}
</ul>
{% endmacro %}