Add page numbers
diff --git a/static/css/style.less b/static/css/style.less
index d0dae9e..90ecfbf 100644
--- a/static/css/style.less
+++ b/static/css/style.less
@@ -13,6 +13,7 @@
@side_size: 250px;
@main_size: 755px;
@border_color: #C2C2C2;
+@pag_label_size: 100px;
body {
margin: 0;
@@ -188,12 +189,19 @@
overflow: auto;
text-align: center;
- span#left{
- float: left;
+ span {
+ width: @pag_label_size;
+ min-height: 1px;
}
- span#right{
+ span#left {
+ float: left;
+ text-align: left;
+ }
+
+ span#right {
float: right;
+ text-align: right;
}
}
}
diff --git a/templates/modules/pagination.html b/templates/modules/pagination.html
index a1ea826..4f15113 100644
--- a/templates/modules/pagination.html
+++ b/templates/modules/pagination.html
@@ -1,12 +1,20 @@
{% if DEFAULT_PAGINATION %}
<div id="paginator">
+<span id="left">
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
-<span id="left"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"><i class="fa fa-arrow-circle-left"></i> Prev Page</a></span>
+<a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"><i class="fa fa-arrow-circle-left"></i> Prev Page</a>
{% endif %}
+</span>
+{% for num in range( 1, 1 + articles_paginator.num_pages ) %}
+ <a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{'[' + num|string + ']' if num == articles_page.number else ' ' + num|string + ' ' }}</a>
+{% endfor %}
+
+<span id="right">
{% if articles_page.has_next() %}
-<span id="right"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Next Page <i class="fa fa-arrow-circle-right"></i></a></span>
+<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Next Page <i class="fa fa-arrow-circle-right"></i></a>
{% endif %}
+</span>
</div>
{% endif %}