-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (54 loc) · 2.08 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
56
57
58
59
60
61
62
63
64
65
66
---
layout: default
---
<div class="posts">
{% for post in paginator.posts %}
<article class="post">
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
<div class="categories">
{% if post.categories %}
{% for category in post.categories %}
<a href="{{ site.baseurl }}/category#{{ category }}">{{ category }}</a>
{% endfor %}
{% endif %}
{% if post.tags %}
<br>
{% for tag in post.tags %}
<a class="icon-tag" href="{{ site.baseurl }}/tag#{{ tag }}">{{ tag }}</a>
{% endfor %}
{% endif %}
</div>
<div class="entry">
{{ post.excerpt | strip_footnotes }}
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="button button-primary">Read More</a>
</article>
{% endfor %}
</div>
<div class="container"><div class="centered">
{% if paginator.total_pages > 1 %}
<!-- Pagination links -->
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous button button-primary button-small"><</a>
{% else %}
<span class="previous button button-disabled button-small"><</span>
{% endif %}
<!-- TODO: add some handling for large number of pages, e.g. > 10 -->
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<em class="button button-active button-small">{{ page }}</em>
{% elsif page == 1 %}
<a class="button button-primary button-small" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a class="button button-primary button-small" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next button button-primary button-small">></a>
{% else %}
<span class="next button button-disabled button-small">></span>
{% endif %}
</div>
{% endif %}
</div></div>