aboutsummaryrefslogtreecommitdiff
path: root/templates/images.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/images.html')
-rw-r--r--templates/images.html53
1 files changed, 10 insertions, 43 deletions
diff --git a/templates/images.html b/templates/images.html
index f4522aa..9fd0584 100644
--- a/templates/images.html
+++ b/templates/images.html
@@ -65,49 +65,16 @@
</div>
{{endfor}}
</div>
- <nav class="pagination">
- <a class="pagination-btn prev" href="/images?q={{query}}&p={{prev_page}}">
- &larr;
- </a>
-
- {{if two_prev_page != 0}}
- <a class="pagination-btn prev" href="/images?q={{query}}&p={{two_prev_page}}">
- {{two_prev_page}}
- </a>
- {{endif}}
-
- {{if prev_page != 0}}
- <a class="pagination-btn prev" href="/images?q={{query}}&p={{prev_page}}">
- {{prev_page}}
- </a>
- {{endif}}
-
- <a class="pagination-btn pagination-current" href="/images?q={{query}}&p={{page}}">
- {{page}}
- </a>
- <a class="pagination-btn next" href="/images?q={{query}}&p={{next_page}}">
- {{next_page}}
- </a>
- <a class="pagination-btn next" href="/images?q={{query}}&p={{two_next_page}}">
- {{two_next_page}}
- </a>
-
- {{if prev_page == 0}}
- <a class="pagination-btn prev" href="/images?q={{query}}&p=4">
- 4
- </a>
- {{endif}}
-
- {{if two_prev_page == 0}}
- <a class="pagination-btn prev" href="/images?q={{query}}&p=5">
- 5
- </a>
- {{endif}}
- <a class="pagination-btn next" href="/images?q={{query}}&p={{next_page}}">
- &rarr;
- </a>
- </nav>
+ {{if exists pagination_links}}
+ <nav class="pagination">
+ {{for link in pagination_links}}
+ <a class="{{link[2]}}" href="{{link[0]}}">
+ {{link[1]}}
+ </a>
+ {{endfor}}
+ </nav>
+ {{endif}}
</main>
</body>
-</html>
+</html> \ No newline at end of file