diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-12-22 13:33:27 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-12-22 13:33:27 +0000 |
commit | a21a5c24d8baa2f14000ca64c10ea315fab708bd (patch) | |
tree | 267ba5584657e739841303b73527f382ff97b503 | |
parent | 0a969e597b708d4e5931a603dafb06db306b2b90 (diff) | |
download | cheatdb-a21a5c24d8baa2f14000ca64c10ea315fab708bd.tar.xz |
Add pagination styling
-rw-r--r-- | app/templates/packages/list.html | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/app/templates/packages/list.html b/app/templates/packages/list.html index fd27373..cc0c6c9 100644 --- a/app/templates/packages/list.html +++ b/app/templates/packages/list.html @@ -8,10 +8,21 @@ {% from "macros/packagegridtile.html" import render_pkggrid %} {{ render_pkggrid(packages) }} - <ul class="btnset linedbuttonset"> - {% if prev_url %}<li><a href="{{ prev_url }}">Previous</a></li>{% endif %} - <li>{{ page }} / {{ page_max }}</li> - {% if next_url %}<li><a href="{{ next_url }}">Next</a></li> {% endif %} + <ul class="pagination mt-4"> + <li class="page-item {% if not prev_url %}disabled{% endif %}"> + <a class="page-link" {% if prev_url %}href="{{ prev_url }}"{% endif %}>«</a> + </li> + {% for n in range(1, page_max+1) %} + <li class="page-item {% if n == page %}active{% endif %}"> + <a class="page-link" + href="{{ url_for('packages_page', type=type, q=query, page=n) }}"> + {{ n }} + </a> + </li> + {% endfor %} + <li class="page-item {% if not next_url %}disabled{% endif %}"> + <a class="page-link" {% if next_url %}href="{{ next_url }}"{% endif %}>»</a> + </li> </ul> {% if topics %} |