2018-08-25 10:31:29 -07:00

72 lines
1.8 KiB
HTML

---
layout: default
---
{% if site.data.menu and site.paginate and site.paginate_path and paginator.page > 1 %}
{% include menu.html %}
{% elsif site.paginate and site.paginate_path and paginator.page > 1 %}
{% include back-link.html %}
{% else %}
<header class="site-masthead">
{% if site.title %}
<h1>
{{ site.title }}
</h1>
{% endif %}
{% if site.title %}
<h2>
{{ site.description }}
</h2>
{% endif %}
{% include menu.html %}
</header>
{% endif %}
<main class="home" aria-label="Content">
<h1 class="content-title divided">
{% if site.paginate and site.paginate_path and paginator.page > 1 %}
Page {{ paginator.page }}
{% else %}
Contents
{% endif %}
</h1>
{% if site.paginate and site.paginate_path %}
<ul class="post-list">
{% for post in paginator.posts %}
{% include post-list-item.html %}
{% endfor %}
</ul>
{% if paginator.total_pages > 1 %}
<div class="post-pagination">
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="pagination-next btn">&lang;&nbsp;Older</a>
{% else %}
<span>&nbsp;</span>
{% endif %}
<span class="pagination-number">{{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="pagination-previous btn">Newer&nbsp;&rang;</a>
{% else %}
<span>&nbsp;</span>
{% endif %}
</div>
{% endif %}
{% else %}
<ul class="post-list">
{% for post in site.posts %}
{% include post-list-item.html %}
{% endfor %}
</ul>
{% endif %}
</main>