37 lines
1 KiB
HTML
37 lines
1 KiB
HTML
{% extends "base.html" %}
|
|
{% import "macros.html" as macros %}
|
|
|
|
{% block content %}
|
|
<h1 class="page-title">Blog</h1>
|
|
|
|
{% if section.description %}
|
|
<p class="section-description">{{ section.description }}</p>
|
|
{% endif %}
|
|
|
|
<ul class="post-list">
|
|
{% if paginator %}
|
|
{% for page in paginator.pages %}
|
|
{{ macros::post_list_item(page=page) }}
|
|
{% endfor %}
|
|
{% else %}
|
|
{% set posts_section = get_section(path="posts/_index.md") %}
|
|
{% for page in posts_section.pages %}
|
|
{{ macros::post_list_item(page=page) }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</ul>
|
|
|
|
{% if paginator %}
|
|
<nav class="pagination" aria-label="Pagination">
|
|
{% if paginator.previous %}
|
|
<a href="{{ paginator.previous }}" rel="prev" class="pagination__button">Newer posts</a>
|
|
{% endif %}
|
|
|
|
<span class="pagination__info">Page {{ paginator.current_index }} of {{ paginator.number_pagers }}</span>
|
|
|
|
{% if paginator.next %}
|
|
<a href="{{ paginator.next }}" rel="next" class="pagination__button">Older posts</a>
|
|
{% endif %}
|
|
</nav>
|
|
{% endif %}
|
|
{% endblock content %}
|