aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/images.html53
-rw-r--r--templates/results.html6
2 files changed, 13 insertions, 46 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
diff --git a/templates/results.html b/templates/results.html
index 4ce7496..54ac195 100644
--- a/templates/results.html
+++ b/templates/results.html
@@ -118,8 +118,8 @@
{{info[2]|safe}}
</p>
<a class="read-more" href="{{info[3]}}">
- {{l("read_more")}}
- </a>
+ {{l("read_more")}}
+ </a>
</div>
</div>
</section>
@@ -129,4 +129,4 @@
</div>
</body>
-</html>
+</html> \ No newline at end of file