minima-dark/_layouts/home.html

59 lines
1.7 KiB
HTML
Raw Normal View History

2021-06-08 05:49:45 +00:00
---
layout: default
---
<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}
{{ content }}
{% if site.paginate %}
{% assign posts = paginator.posts %}
{% else %}
{% assign posts = site.posts %}
{% endif %}
{%- if posts.size > 0 -%}
2021-06-09 03:22:02 +00:00
<div class="post-list">
2021-06-08 05:49:45 +00:00
{%- if page.list_title -%}
<h2 class="post-list-heading">{{ page.list_title }}</h2>
{%- endif -%}
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
{%- for post in posts -%}
2021-06-09 03:38:44 +00:00
<article>
2021-06-08 17:14:12 +00:00
<h2>
2021-06-08 05:49:45 +00:00
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
2021-06-08 17:14:12 +00:00
</h2>
2021-06-08 17:43:47 +00:00
<h3><span class="post-meta">{{ post.date | date: date_format }}</span></h3>
2021-06-08 05:49:45 +00:00
{%- if site.show_excerpts -%}
2021-06-08 17:07:18 +00:00
<blockquote>{{ post.excerpt }}</blockquote>
2021-06-08 05:49:45 +00:00
{%- endif -%}
2021-06-09 03:40:02 +00:00
</article>
2021-06-09 02:44:28 +00:00
{%- endfor -%}
2021-06-08 05:49:45 +00:00
{% if site.paginate %}
<div class="pager">
<ul class="pagination">
{%- if paginator.previous_page %}
<li><a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">{{ paginator.previous_page }}</a></li>
{%- else %}
<li><div class="pager-edge"></div></li>
{%- endif %}
<li><div class="current-page">{{ paginator.page }}</div></li>
{%- if paginator.next_page %}
<li><a href="{{ paginator.next_page_path | relative_url }}" class="next-page">{{ paginator.next_page }}</a></li>
{%- else %}
<li><div class="pager-edge"></div></li>
{%- endif %}
</ul>
</div>
{%- endif %}
{%- endif -%}
</div>