Remove body_classes block
This commit is contained in:
parent
f2b0352481
commit
7b0f15bfe8
9 changed files with 104 additions and 132 deletions
|
@ -8,35 +8,31 @@ pagination:
|
|||
use:
|
||||
- posts
|
||||
---
|
||||
{% block body_classes %}page--blog page--blog__list{% endblock %}
|
||||
<h1>Blog</h1>
|
||||
|
||||
{% block content %}
|
||||
<h1>Blog</h1>
|
||||
<ul class="posts">
|
||||
{% for post in page.pagination.items %}
|
||||
<li class="post">
|
||||
{% include 'post_header' with { page: post, title_tag: 'h2' } %}
|
||||
|
||||
<ul class="posts">
|
||||
{% for post in page.pagination.items %}
|
||||
<li class="post">
|
||||
{% include 'post_header' with { page: post, title_tag: 'h2' } %}
|
||||
{% 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 %}
|
||||
|
||||
{% 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 %}
|
||||
<a href="{{ post.url }}">Read more →</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<a href="{{ post.url }}">Read more →</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if page.pagination.previous_page or page.pagination.next_page %}
|
||||
<nav>
|
||||
{% if page.pagination.previous_page %}
|
||||
<a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer Items</a>
|
||||
{% endif %}
|
||||
{% if page.pagination.next_page %}
|
||||
<a href="{{ site.url }}{{ page.pagination.next_page.url }}">Older Items</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
{% if page.pagination.previous_page or page.pagination.next_page %}
|
||||
<nav>
|
||||
{% if page.pagination.previous_page %}
|
||||
<a href="{{ site.url }}{{ page.pagination.previous_page.url }}">Newer Items</a>
|
||||
{% endif %}
|
||||
{% if page.pagination.next_page %}
|
||||
<a href="{{ site.url }}{{ page.pagination.next_page.url }}">Older Items</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue