add pagination boilerplate
This commit is contained in:
parent
fed5859a21
commit
575b317811
3 changed files with 17 additions and 3 deletions
|
|
@ -13,8 +13,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div id="feed">
|
<div id="feed">
|
||||||
|
{% if paginated %}
|
||||||
|
{% set cycling = paginated | i18n_filter %}
|
||||||
|
{% else %}
|
||||||
|
{% set cycling = collections[cycling_tag] | i18n_filter %}
|
||||||
|
{% endif %}
|
||||||
{% set current_year = 0 %}
|
{% set current_year = 0 %}
|
||||||
{% for post in collections[cycling_tag] | i18n_filter %}
|
{% for post in cycling %}
|
||||||
{% set post_year = post.date | date("yyyy") %}
|
{% set post_year = post.date | date("yyyy") %}
|
||||||
{% if post_year != current_year %}
|
{% if post_year != current_year %}
|
||||||
<h2 class="year-title">{{ post_year }}</h2>
|
<h2 class="year-title">{{ post_year }}</h2>
|
||||||
|
|
@ -37,6 +42,7 @@
|
||||||
<p class="post-link"><a href="{{ post.url | locale_url_resolve }}">{{ "read-more" | i18n }}</a></p>
|
<p class="post-link"><a href="{{ post.url | locale_url_resolve }}">{{ "read-more" | i18n }}</a></p>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{# TODO: handle pagination buttons #}
|
||||||
<div class="end-of-feed">
|
<div class="end-of-feed">
|
||||||
<a href="https://www.youtube.com/watch?v=mB5YeQFw1S4" target="_blank">
|
<a href="https://www.youtube.com/watch?v=mB5YeQFw1S4" target="_blank">
|
||||||
<div id="tv"></div>
|
<div id="tv"></div>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ title: blog
|
||||||
layout: recent_feed
|
layout: recent_feed
|
||||||
cycling_tag: posts
|
cycling_tag: posts
|
||||||
sidebar: blog
|
sidebar: blog
|
||||||
|
pagination:
|
||||||
|
data: collections.posts
|
||||||
|
size: 6
|
||||||
|
alias: paginated
|
||||||
flight:
|
flight:
|
||||||
img: /img/gifcities/mimi.gif
|
img: /img/gifcities/mimi.gif
|
||||||
url: /
|
url: /
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,13 @@ title: blog
|
||||||
layout: recent_feed
|
layout: recent_feed
|
||||||
cycling_tag: posts
|
cycling_tag: posts
|
||||||
sidebar: blog
|
sidebar: blog
|
||||||
|
pagination:
|
||||||
|
data: collections.posts
|
||||||
|
size: 6
|
||||||
|
alias: paginated
|
||||||
flight:
|
flight:
|
||||||
img: /img/gifcities/mimi.gif
|
img: /img/gifcities/mimi.gif
|
||||||
url: /
|
url: /
|
||||||
---
|
---
|
||||||
# blog
|
# blog
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue