re-indent blog.html
This commit is contained in:
parent
d2cfe72e90
commit
b62b3c0b0d
1 changed files with 11 additions and 10 deletions
21
blog.html
21
blog.html
|
@ -5,31 +5,32 @@ pagination:
|
||||||
enabled: true
|
enabled: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- dummy content -->
|
<!-- posts -->
|
||||||
{% for post in paginator.posts %}
|
{% for post in paginator.posts %}
|
||||||
<h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
|
<h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
|
||||||
<p class="post-metadata">Published on {{ post.date | date: "%b %-d, %Y" }}</p>
|
<p class="post-metadata">Published on {{ post.date | date: "%b %-d, %Y" }}</p>
|
||||||
{{ post.content }}
|
{{ post.content }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
<!-- pagination -->
|
||||||
{% if paginator.total_pages > 1 %}
|
{% if paginator.total_pages > 1 %}
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
{% if paginator.previous_page %}
|
{% if paginator.previous_page %}
|
||||||
<li><a href="{{ paginator.previous_page_path | relative_url }}">« Prev</a>
|
<li><a href="{{ paginator.previous_page_path | relative_url }}">« Prev</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for page in (1..paginator.total_pages) %}
|
{% for page in (1..paginator.total_pages) %}
|
||||||
{% if page == paginator.page %}
|
{% if page == paginator.page %}
|
||||||
<li>{{ page }}</li>
|
<li>{{ page }}</li>
|
||||||
{% elsif page == 1 %}
|
{% elsif page == 1 %}
|
||||||
<li><a href="{{ paginator.previous_page_path | relative_url }}">{{ page }}</a></li>
|
<li><a href="{{ paginator.previous_page_path | relative_url }}">{{ page }}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a></li>
|
<li><a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if paginator.next_page %}
|
{% if paginator.next_page %}
|
||||||
<li><a href="{{ paginator.next_page_path | relative_url }}">Next »</a></li>
|
<li><a href="{{ paginator.next_page_path | relative_url }}">Next »</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue