page nav for photo gallery
This commit is contained in:
parent
a528892ac8
commit
15b1d3999a
4 changed files with 28 additions and 2 deletions
|
@ -16,5 +16,14 @@
|
|||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
{% if page > 1 %}
|
||||
<a href="{{ url_for('photography', page=page-1) }}" class="nav-item next">← Newer</a>
|
||||
{% endif %}
|
||||
{% if has_next %}
|
||||
<a href="{{ url_for('photography', page=page+1) }}" class="nav-item prev">Older →</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
|
|
@ -28,5 +28,6 @@
|
|||
<a href="{{ url_for('view_photo', photo_id=prev.id) }}" class="nav-item prev">Previous →</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</nav>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
|
Reference in a new issue