aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-01-11 01:31:09 +0000
committerubq323 <ubq323@ubq323.website>2022-01-11 01:31:09 +0000
commit22dbccb40a5444550ef4ead954aa295d51c4eb24 (patch)
tree5cba6378fb17ea0e1ddbf3aeb47b90f9bd958f0a
parent4e2fadd8866f61a22fac3f862789f22b705035c6 (diff)
parentb08eb8d07f57cd5606e4b4867ad0e86c75a7311f (diff)
Merge branch 'pagination' into webhooks
-rw-r--r--apioforum/static/style.css4
-rw-r--r--apioforum/templates/common.html8
2 files changed, 8 insertions, 4 deletions
diff --git a/apioforum/static/style.css b/apioforum/static/style.css
index 280749b..342db6c 100644
--- a/apioforum/static/style.css
+++ b/apioforum/static/style.css
@@ -116,6 +116,10 @@ nav#navbar p:first-of-type { margin-left:0.5em }
nav#navbar a { color: blue; text-decoration: none }
nav#navbar .links { display: flex; }
+nav#pages { text-align: center; margin-top: 2vh; margin-bottom: 2vh; }
+nav#pages a { margin-left: 2vw; margin-right: 2vw; }
+nav#pages .mid { margin-left: 5vw; margin-right: 5vw; }
+
/* todo: make the navbar less bad */
.flashmsg { border: 1px solid black; background-color: yellow; max-width: max-content; padding: 5px; clear: both;}
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html
index 8eeef70..638c423 100644
--- a/apioforum/templates/common.html
+++ b/apioforum/templates/common.html
@@ -142,13 +142,13 @@
{% macro pagination_nav(page,max_pageno,view) %}
<nav aria-label="pagination" id="pages">
{% if page > 1 %}
- <a href="{{url_for(view,**kwargs)}}" aria-label="first page">&lt;&lt;</a>
- <a href="{{url_for(view,page=page-1,**kwargs)}}" aria-label="previous page">&lt;</a>
+ <a href="{{url_for(view,**kwargs)}}" aria-label="first page">&lt;&lt; first</a>
+ <a href="{{url_for(view,page=page-1,**kwargs)}}" aria-label="previous page">&lt; prev</a>
{% endif %}
page {{page}} of {{max_pageno}}
{% if page < max_pageno %} {# > #}
- <a href="{{url_for(view,page=page+1,**kwargs)}}" aria-label="next page">&gt;</a>
- <a href="{{url_for(view,page=max_pageno,**kwargs)}}" aria-label="last page">&gt;&gt;</a>
+ <a href="{{url_for(view,page=page+1,**kwargs)}}" aria-label="next page">next &gt;</a>
+ <a href="{{url_for(view,page=max_pageno,**kwargs)}}" aria-label="last page">last &gt;&gt;</a>
{% endif %}
</nav>
{% endmacro %}