This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/blog.html

49 lines
1.4 KiB
HTML
Raw Normal View History

2015-03-16 11:16:42 +00:00
---
layout: default
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
2016-12-29 16:32:52 +00:00
use: [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
2017-11-09 22:44:30 +00:00
<ul class="listing">
2016-09-01 07:00:21 +00:00
{% for post in page.pagination.items %}
2017-11-09 22:44:30 +00:00
<li class="listing-item">
2016-09-01 07:00:21 +00:00
{{ include('post/header', {
page: post,
title_tag: 'h2'
}) }}
2015-03-16 11:16:42 +00:00
2017-08-06 18:31:59 +00:00
{% include 'post/intro-image' with { page: post } %}
2016-09-01 07:00:21 +00:00
{% if post.blocks.excerpt %}
{{ post.blocks.excerpt|raw }}
{% else %}
<p>{{ post.blocks.content|raw|striptags|split(' ')|slice(0,50)|join(' ')|replace({ 'h2':'h3' }) }} &hellip;</p>
{% endif %}
2015-06-29 11:52:37 +00:00
2016-09-01 07:00:21 +00:00
<a href="{{ post.url }}">Read more &rarr;</a>
</li>
{% endfor %}
2015-09-10 01:59:20 +00:00
</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 %}
2017-11-09 22:44:30 +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 %}
2017-11-09 22:44:30 +00:00
2015-09-10 01:59:20 +00:00
{% if page.pagination.next_page %}
2017-11-09 22:44:30 +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 %}