forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
51 lines (43 loc) · 1.5 KB
/
index.html
File metadata and controls
51 lines (43 loc) · 1.5 KB
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
---
layout: default
pagination:
enabled: true
---
<div class="posts">
<div class="row">
<div class="col-sm-8">
{% for post in paginator.posts %}
{% include archive_single.html post=post %}
{% endfor %}
<!-- Pagination links -->
<div class="pagination">
{% comment %} Determine whether the first page and the last page are already included in trail (need for TODO ellipses) {% endcomment %}
{% for trail in paginator.page_trail %}
{% if trail.num == paginator.first_page %}
{% assign has_first_page = true %}
{% elsif trail.num == paginator.last_page %}
{% assign has_last_page = true %}
{% endif %}
{% endfor %}
{% if paginator.previous_page == nil %}
{% assign previous_page_class = "pagination-disabled" %}
{% endif %}
{% if paginator.next_page == nil %}
{% assign next_page_class = "pagination-disabled" %}
{% endif %}
<a href="{{ paginator.previous_page_path }}" class="newer {{previous_page_class}}">← Newer</a>
<div class="page-numbers">
{% for page in paginator.page_trail %}
{% if page.num == paginator.page %}
<span class="page-button current-page">{{ page.num }}</span>
{% else %}
<span class="page-button"><a href="{{ page.path }}">{{ page.num }}</a></span>
{% endif %}
{% endfor %}
</div>
<a href="{{ paginator.next_page_path }}" class="older {{next_page_class}}">Older →</a>
</div>
</div>
{% include sidebar.html %}
</div>
</div>