mirror of
https://github.com/helenclx/leilukin-site.git
synced 2025-04-01 19:20:51 +00:00
Display previous and next post pagination if there is more than one post
This commit is contained in:
parent
cfd77e4af2
commit
eb212af7ce
@ -51,8 +51,8 @@
|
||||
{{ content | safe }}
|
||||
|
||||
{% if tags and tags.includes("posts") %}
|
||||
{%- if collections.posts.length > 1 %}
|
||||
<nav class="blog__post--pagination" aria-labelledby="nextprev-title">
|
||||
{%- if collections.posts %}
|
||||
<h2 class="visually-hidden" id="nextprev-title">Next and Previous Blog Posts</h2>
|
||||
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
|
||||
{%- set nextPost = collections.posts | getNextCollectionItem %}
|
||||
@ -72,8 +72,8 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
</nav>
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
</{{contentEl}}>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user