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

12 lines
802 B
Text
Raw Normal View History

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