chore: pagination + misc updates

This commit is contained in:
Cory Dransfeldt 2024-05-29 08:58:30 -07:00
parent 616a725b2e
commit 5a73013e37
No known key found for this signature in database
12 changed files with 27 additions and 17 deletions

View file

@ -1,3 +1,4 @@
{% assign hidePagination = count or data.pages.size <= 1 %}
{% assign media = data.items | default: data | normalizeMedia %}
<div class="media-grid {% if shape == 'square' %}square{% else %}vertical{% endif %}">
{% for item in media limit: count | default: media.size %}
@ -24,6 +25,6 @@
</a>
{% endfor %}
</div>
{% unless count %}
{% unless hidePagination %}
{% render "partials/widgets/paginator.liquid", pagination:data %}
{% endunless %}

View file

@ -1,4 +1,5 @@
<div class="watching grid">
{% assign hidePagination = count or data.pages.size <= 1 %}
<div class="watching grid{% if hidePagination %} no-pagination {% endif %}">
{% assign items = data.items | default: mediaItems %}
{% for item in items limit: count %}
{% capture alt %}{{ item.title | escape }} ({{ item.year }}){% endcapture %}
@ -25,6 +26,6 @@
</a>
{% endfor %}
</div>
{% unless count %}
{% unless hidePagination %}
{% render "partials/widgets/paginator.liquid", pagination:data %}
{% endunless %}