forked from spress/spress-theme-spresso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (44 loc) · 1.32 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
layout: page
title: Welcome
---
{% if site.paginate > 0 %}
{% for post in paginator.posts %}
{% include "post.html" %}
{% endfor %}
{% if paginator.posts | length < 1 %}
<div class="page-header">
<h1>Welcome <small>to the blog</small></h1>
</div>
<p>Until now, there is no posts. :(</p>
{% endif %}
{% else %}
<div class="page-header">
<h1>Blog <small>posts</small></h1>
</div>
{% include "posts-list.html" with { posts: site.posts } %}
{% if site.posts | length < 1 %}
<p>Until now, there is no posts. :(</p>
{% endif %}
{% endif %}
{% if paginator.total_pages > 1 %}
<ul class="pagination">
{% if paginator.previous_page %}
<li>
<a class="prev" href="/{%if paginator.previous_page > 1 %}page{{ paginator.previous_page }}/{% endif %}">
« Newer
</a>
</li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li><span class="active">{{ page }}</span></li>
{% else %}
<li><a href="/{%if page > 1 %}page{{ page }}/{% endif %}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li><a href="/page{{ paginator.next_page }}/">Older »</a></li>
{% endif %}
</ul>
{% endif %}