bune.city/_layouts/pagination.html

35 lines
1.3 KiB
HTML
Raw Normal View History

2020-04-06 05:03:07 +00:00
---
layout: default
---
<h1 id='logo'>{{ site.title }}</h1>
{%- if page.autopages %}
<div id='subheading'>Posts {{ page.pagination_type | default: "in category" }} "{{ page.autopages.display_name }}"</div>
2020-04-06 05:03:07 +00:00
{% endif -%}
<main>
<div id='posts'>
{% for post in paginator.posts %}
<div class='post'>
<h2><a href='{{ post.url }}'>{{ post.title }}</a></h2>
<div id='post-info'>
<i class='material-icons'>access_time</i> <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string: "ordinal" }}</time>
2020-04-06 05:03:07 +00:00
<i class='material-icons'>group_work</i>
{{ " " }}{%- for category in post.categories -%}
<a href='/categories/{{ category | downcase }}'>{{ category }}</a>
{%- unless category == post.categories.last %}, {% endunless %}
{%- endfor %} <br>
</div>
<div class='post-excerpt'>
<p>{{ post.summary | default: post.excerpt }}</p>
</div>
</div>
{% endfor %}
{%- if paginator.total_pages > 1 %}
<div id='pagination'>
2020-04-06 12:19:02 +00:00
<a {%- if paginator.previous_page %} href='{{ paginator.previous_page_path | absolute_url }}' rel='prev' {%- endif %}>Newer</a>
2020-04-06 05:03:07 +00:00
Page {{ paginator.page }} of {{ paginator.total_pages }}
2020-04-06 12:19:02 +00:00
<a {%- if paginator.next_page %} href='{{ paginator.next_page_path | absolute_url }}' rel='next' {%- endif %}>Older</a>
2020-04-06 05:03:07 +00:00
</div>
{%- endif %}
</div>
</main>