crappy-jekyll/_layouts/blogindex.html

57 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2022-09-19 15:25:54 +00:00
---
layout: default
---
<div class="home">
{{ content }}
{% if site.paginate %}
{% assign posts = paginator.posts %}
{% else %}
{% assign posts = site.posts %}
{% endif %}
{%- if posts.size > 0 -%}
<div class="post-list">
{%- 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 -%}
<article>
<h2>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h2>
<h3><span class="post-meta">{{ post.date | date: date_format }}</span></h3>
{%- if site.show_excerpts -%}
<blockquote>{{ post.excerpt }}</blockquote>
{%- endif -%}
</article>
{%- endfor -%}
{% 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>