Skip to content
Snippets Groups Projects
Commit 7fbbf165 authored by Huste, Tobias's avatar Huste, Tobias
Browse files

Merge branch '55-more-news-per-page' into 'master'

Resolve "News page: Possibly more than 5 + Arrows on bottom of page"

Closes #55

See merge request hifis/hifis.net!57
parents 5a45a2a2 29c036b6
No related branches found
No related tags found
1 merge request!57Resolve "News page: Possibly more than 5 + Arrows on bottom of page"
......@@ -80,7 +80,7 @@ plugins:
- 'jekyll-feed'
- 'jekyll-sitemap'
paginate: 5
paginate: 8
paginate_path: '/news/page:num/'
markdown: kramdown
......
......@@ -94,6 +94,56 @@ title: HIFIS
</article>
{% endfor %}
{% if paginator.total_pages > 1 %}
<nav class="page-navigation grid-container">
<div class="pagination-container grid-item">
{% if paginator.previous_page %}
<span>
<a href="{{ paginator.previous_page_path | relative_url }}">
<i class="fas fa-backward"></i>
</a>
</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span> {{ page }} </span>
{% elsif page == 1 %}
<span>
<a href="{{ 'news/' | relative_url }}"> {{ page }} </a>
</span>
{% else %}
<span>
<a href="{{ site.paginate_path
| relative_url
| replace: ':num', page }}">
{{ page }}
</a>
</span>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<span>
<a href="{{ paginator.next_page_path | relative_url }}">
<i class="fas fa-forward"></i>
</a>
</span>
{% endif %}
</div>
<div class="rss-posts-container grid-item">
<a class="rss-posts-button" href="{{ '/feed/news.xml' | relative_url }}"
title="subscribe to feed"
type="application/atom+xml"
download>
<i class="fas fa-rss"></i>
</a>
</div>
</nav>
{% endif %}
</section>
</main>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment