diff options
Diffstat (limited to 'blog/index.html')
-rw-r--r-- | blog/index.html | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/blog/index.html b/blog/index.html index 512e009..aaf8fbd 100644 --- a/blog/index.html +++ b/blog/index.html @@ -8,7 +8,7 @@ hidden: true <section id="news" class="wide"> <h2>{% t home.latest_news %}</h2> - {% for p in site.posts limit: 5 %} + {% for p in paginator.posts %} <article> <header> <date>{{ p.date | date_to_string }}</date> @@ -21,7 +21,6 @@ hidden: true </section> </article> {% endfor %} - <a href="{{ '/archive.html' | prepend: site.baseurl }}">{% t home.older_news %}</a> </section> {% if site.links %} @@ -29,3 +28,18 @@ hidden: true <h2>{% t home.links %}</h2> </section> {% endif %} + +<!-- Pagination links --> +<div class="pagination"> + {% if paginator.previous_page %} + <a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="previous">{% t home.prev_page %}</a> + {% else %} + <span class="previous">{% t home.prev_page %}</span> + {% endif %} + <span class="page_number ">{% t home.page_no %} {{ paginator.page }} / {{ paginator.total_pages }}</span> + {% if paginator.next_page %} + <a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="next">{% t home.next_page %}</a> + {% else %} + <span class="next ">{% t home.next_page %}</span> + {% endif %} +</div> |