Skip to content

Commit 4ed867c

Browse files
committed
add missing file
1 parent a04eb0b commit 4ed867c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{% extends "layout.html" %}
2+
3+
{# Macro for creating navigation links #}
4+
{% macro render_navigation(pagination, endpoint) %}
5+
<div class=pagination>
6+
{% for page in pagination.iter_pages() %}
7+
{% if page %}
8+
{% if page != pagination.page %}
9+
<a href="{{ url_for(endpoint, page=page) }}">{{ page }}</a>
10+
{% else %}
11+
<strong>{{ page }}</strong>
12+
{% endif %}
13+
{% else %}
14+
<span class=ellipsis></span>
15+
{% endif %}
16+
{% endfor %}
17+
</div>
18+
{% endmacro %}
19+
20+
{% block body %}
21+
22+
<div class="todos">
23+
<ul>
24+
{% for todo in todos_page.items %}
25+
<li>{{ todo.title }}</li>
26+
{% endfor %}
27+
</ul>
28+
</div>
29+
30+
<div class="navigation">
31+
{{ render_navigation(todos_page, 'pagination') }}
32+
</div>
33+
34+
35+
{% endblock %}

0 commit comments

Comments
 (0)