aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--apioforum/static/style.css9
-rw-r--r--apioforum/templates/common.html4
-rw-r--r--apioforum/templates/view_forum.html1
-rw-r--r--apioforum/templates/view_thread.html1
4 files changed, 9 insertions, 6 deletions
diff --git a/apioforum/static/style.css b/apioforum/static/style.css
index 40df339..0da7216 100644
--- a/apioforum/static/style.css
+++ b/apioforum/static/style.css
@@ -190,21 +190,22 @@ nav#navbar p:first-of-type { margin-left:0.5em }
nav#navbar a { color: var(--blue); text-decoration: none }
nav#navbar .links { display: flex; }
-nav#pages {
+nav.pages {
display: flex;
text-align: center;
justify-content: space-between;
margin-bottom: -1px;
+ margin-top: -1px;
padding: 5px;
border: 1px solid var(--border-colour);
background-color: var(--alternating-colour-even);
- position: sticky;
top: 0;
}
+.pages-top { position: sticky; }
-nav#pages .links > a:not([href]) { color: var(--gray); }
+nav.pages .links > a:not([href]) { color: var(--gray); }
-nav#pages .pageno { align-self: center; }
+nav.pages .pageno { align-self: center; }
/* todo: make the navbar less bad */
.flashmsg { border: 1px solid var(--border-colour); background-color: yellow; max-width: max-content; padding: 5px; clear: both; color: black}
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html
index 829e36a..2a19b5c 100644
--- a/apioforum/templates/common.html
+++ b/apioforum/templates/common.html
@@ -156,8 +156,8 @@
</svg>
{% endmacro %}
-{% macro pagination_nav(page,max_pageno,view) %}
-<nav aria-label="pagination" id="pages">
+{% macro pagination_nav(page,max_pageno,view,bottom=False) %}
+<nav aria-label="pagination" class="pages{% if not bottom %} pages-top{% endif %}">
<div class="links">
{% if page > 1 %}
<a href="{{url_for(view,**kwargs)}}" aria-label="first page">&lt;&lt; first</a>
diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html
index 7aca977..94238a7 100644
--- a/apioforum/templates/view_forum.html
+++ b/apioforum/templates/view_forum.html
@@ -197,5 +197,6 @@ you do not have permission to create threads in this forum
{% endif %}
</div>
+{{ pagination_nav(page,max_pageno,'forum.view_forum',forum_id=forum.id,bottom=True) }}
{%endblock%}
diff --git a/apioforum/templates/view_thread.html b/apioforum/templates/view_thread.html
index 56f98e1..0210c55 100644
--- a/apioforum/templates/view_thread.html
+++ b/apioforum/templates/view_thread.html
@@ -70,6 +70,7 @@
{% endif %}
{% endfor %}
</div>
+{{ pagination_nav(page,max_pageno,'thread.view_thread',thread_id=thread.id,bottom=True) }}
{% if g.user and has_permission(thread.forum, g.user, "p_reply_threads") %}
<form class="new-post" action="{{url_for('thread.create_post',thread_id=thread.id)}}" method="POST">
<textarea class="new-post-box" placeholder="your post here..." name="content"></textarea>