Create template for older / newer pagination

This commit is contained in:
Helen Chong 2024-04-17 01:21:20 +08:00
parent d59e8dbc15
commit 804126d745
3 changed files with 15 additions and 26 deletions

View File

@ -0,0 +1,13 @@
<p class="center-text">
{% if pagination.href.previous %}
<a href=" {{ pagination.href.previous }}">Newer</a>
{% else %}
Newer
{% endif %}
/
{% if pagination.href.next %}
<a href=" {{ pagination.href.next }}">Older</a>
{% else %}
Older
{% endif %}
</p>

View File

@ -31,16 +31,4 @@ permalink: "/{{ page.fileSlug }}{% if pagination.pageNumber > 0 %}/page/{{ pagin
{% endfor %}
</ul>
<p class="center-text">
{% if pagination.href.previous %}
<a href=" {{ pagination.href.previous }}">Newer</a>
{% else %}
Newer
{% endif %}
/
{% if pagination.href.next %}
<a href=" {{ pagination.href.next }}">Older</a>
{% else %}
Older
{% endif %}
</p>
{% include "global/pagination-oldnew.njk" %}

View File

@ -22,16 +22,4 @@ permalink: "/{{ page.fileSlug }}{% if pagination.pageNumber > 0 %}/page/{{ pagin
{%- endfor %}
</article>
<p class="center-text">
{% if pagination.href.previous %}
<a href=" {{ pagination.href.previous }}">Newer</a>
{% else %}
Newer
{% endif %}
/
{% if pagination.href.next %}
<a href=" {{ pagination.href.next }}">Older</a>
{% else %}
Older
{% endif %}
</p>
{% include "global/pagination-oldnew.njk" %}