-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
55 lines (48 loc) · 1.64 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
49
50
51
52
53
54
55
---
layout: default
---
<div class="home">
<ul class="post-list">
{% for post in paginator.posts %}
{% assign author = site.data.members[post.author] %}
<li>
<h1>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h1>
<p class="post-meta">{{ post.date | date: "%-d / %m / %Y" }}{% if post.author %} • <a href="https://github.com/{{ author.github }}">{{ author.name }}</a>{% endif %}{% if post.meta %} • {{ post.meta }}{% endif %}</p>
{{ post.content }}
</li>
{% endfor %}
</ul>
{% if paginator.total_pages > 1 %}
<div class="text-center">
<ul class="pagination">
<li>
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">«</a>
{% else %}
<span>«</span>
{% endif %}
</li>
{% for page in (1..paginator.total_pages) %}
<li>
{% if page == paginator.page %}
<a href="#" class="active">{{ page }}</a>
{% elsif page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
</li>
{% endfor %}
<li>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">»</a>
{% else %}
<span>»</span>
{% endif %}
</li>
</ul>
</div>
{% endif %}
</div>