46 lines
1.5 KiB
HTML
46 lines
1.5 KiB
HTML
---
|
|
layout: default
|
|
---
|
|
|
|
<h2><center>Recent Posts</center></h2>
|
|
|
|
{% for post in paginator.posts %}
|
|
<div class="post-list-item">
|
|
<h3><a class="post-title" href="{{ post.url }}">{{ post.title }}</a></h3>
|
|
|
|
<p><b>> {{ post.date | date_to_string }}</b></p>
|
|
|
|
<p class="post-summary">
|
|
<div class="quote">
|
|
{{ post.excerpt }}...
|
|
</div>
|
|
</p>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if paginator.total_pages > 1 %}
|
|
<div class="container">
|
|
<div class="horizontal">
|
|
<div class="pagination">
|
|
{% if paginator.previous_page == 1 %}
|
|
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">«</a>
|
|
{% elsif paginator.previous_page%}
|
|
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">«</a>
|
|
{% else %}
|
|
<span class="page-item">«</span>
|
|
{% endif %} {% for page in (1..paginator.total_pages) %} {% if page == paginator.page %}
|
|
<span class="page-item">{{ page }}</span>
|
|
{% elsif page == 1 %}
|
|
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">{{ page }}</a>
|
|
{% else %}
|
|
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}" class="page-item">{{ page }}</a>
|
|
{% endif %} {% endfor %} {% if paginator.next_page %}
|
|
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">»</a>
|
|
{% else %}
|
|
<span class="page-item">»</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|