--- layout: default refactor: true --- {% include lang.html %} {% assign all_pinned = site.posts | where: 'pin', 'true' %} {% assign all_normal = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %} {% assign posts = '' | split: '' %} {% assign visible_start = paginator.page | minus: 1 | times: paginator.per_page %} {% assign visible_end = visible_start | plus: paginator.per_page %} {% if all_pinned.size > visible_start %} {% if all_pinned.size > visible_end %} {% assign pinned_size = paginator.per_page %} {% else %} {% assign pinned_size = all_pinned.size | minus: visible_start %} {% endif %} {% for i in (visible_start..all_pinned.size) limit: pinned_size %} {% assign posts = posts | push: all_pinned[i] %} {% endfor %} {% else %} {% assign pinned_size = 0 %} {% endif %} {% assign normal_size = paginator.posts | size | minus: pinned_size %} {% if normal_size > 0 %} {% if pinned_size > 0 %} {% assign normal_start = 0 %} {% else %} {% assign normal_start = visible_start | minus: all_pinned.size %} {% endif %} {% assign normal_end = normal_start | plus: normal_size | minus: 1 %} {% for i in (normal_start..normal_end) %} {% assign posts = posts | push: all_normal[i] %} {% endfor %} {% endif %}
{% for post in posts %}
{% assign card_body_col = '12' %} {% if post.image %} {% assign src = post.image.path | default: post.image %} {% unless src contains '//' %} {% assign src = post.media_subpath | append: '/' | append: src | replace: '//', '/' %} {% endunless %} {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %} {% assign lqip = null %} {% if post.image.lqip %} {% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %} {% endif %}
{{ alt }}
{% assign card_body_col = '7' %} {% endif %}

{{ post.title }}

{% include post-description.html %}

{% endfor %}
{% if paginator.total_pages > 1 %} {% include post-paginator.html %} {% endif %}