2015-03-16 11:16:42 +00:00
|
|
|
---
|
|
|
|
layout: default
|
2015-09-10 01:45:52 +00:00
|
|
|
nav: blog
|
2015-03-16 11:16:42 +00:00
|
|
|
title: Blog
|
2015-06-15 08:37:37 +00:00
|
|
|
generator: pagination
|
2015-06-15 08:38:09 +00:00
|
|
|
pagination:
|
2015-08-09 23:14:36 +00:00
|
|
|
max_per_page: 10
|
2015-03-19 11:36:09 +00:00
|
|
|
use:
|
2015-08-09 23:14:36 +00:00
|
|
|
- posts
|
2015-03-16 11:16:42 +00:00
|
|
|
---
|
2015-09-10 01:59:20 +00:00
|
|
|
{% block content %}
|
|
|
|
<h1>Blog</h1>
|
2015-06-18 16:50:37 +00:00
|
|
|
|
2015-09-10 01:59:20 +00:00
|
|
|
<ul class="posts">
|
|
|
|
{% for post in page.pagination.items %}
|
|
|
|
<li class="post">
|
2015-09-13 22:36:54 +00:00
|
|
|
{% include 'post-header' with { page: post, title_tag: 'h2' } %}
|
2015-03-16 11:16:42 +00:00
|
|
|
|
2015-09-10 01:59:20 +00:00
|
|
|
{% if post.blocks.excerpt %}
|
|
|
|
{{ post.blocks.excerpt|raw }}
|
|
|
|
{% else %}
|
|
|
|
<p>{{ post.blocks.content|raw|split(' ')|slice(0,50)|join(' ')|replace({ 'h2':'h3' })|raw }} …</p>
|
|
|
|
{% endif %}
|
2015-06-29 11:52:37 +00:00
|
|
|
|
2015-09-10 01:59:20 +00:00
|
|
|
<a href="{{ post.url }}">Read more →</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2015-07-21 17:03:01 +00:00
|
|
|
|
2015-09-10 01:59:20 +00:00
|
|
|
{% if page.pagination.previous_page or page.pagination.next_page %}
|
2015-09-13 21:37:44 +00:00
|
|
|
<ul class="pager">
|
2015-09-10 01:59:20 +00:00
|
|
|
{% if page.pagination.previous_page %}
|
2015-09-13 21:37:44 +00:00
|
|
|
<li class="next"><a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer →</a></li>
|
2015-09-10 01:59:20 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if page.pagination.next_page %}
|
2015-09-13 21:37:44 +00:00
|
|
|
<li class="previous"><a href="{{ site.url }}{{ page.pagination.next_page.url }}">← Older</a></li>
|
2015-09-10 01:59:20 +00:00
|
|
|
{% endif %}
|
2015-09-13 21:37:44 +00:00
|
|
|
</ul>
|
2015-09-10 01:59:20 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block body_classes 'page--blog page--blog__list' %}
|