-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (42 loc) · 1.51 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
---
layout: default
---
{% for post in paginator.posts %}
<div class="mb-5">
<h1 class="mb-0 blog-link"><a href="{{ post.url }}">{{ post.title }}</a></h1>
<p><small class="text-muted mb-4">{{ post.date | date_to_long_string }}</small></p>
{{ post.excerpt }}
<a href="{{ post.url }}">Read More...</a>
</div>
{% endfor %}
{% if paginator.total_pages > 1 %}
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center">
<li class="page-item">
<a class="page-link" href="{{ '/' | relative_url }}" aria-label="First Page">
<span aria-hidden="true">«</span>
<span class="sr-only">First Page</span>
</a>
</li>
{% for page in (1..paginator.total_pages) %}
{% assign active = "" %}
{% if page == paginator.page %}
{% assign active = "active" %}
{% endif %}
<li class="page-item {{ active }}">
{% if page == 1 %}
<a class="page-link" href="{{ '/' | relative_url }}">{{ page }} {% if active.size > 0 %}<span class="sr-only">(current)</span>{% endif %}</a>
{% else %}
<a class="page-link" href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}{% if active.size > 0 %}<span class="sr-only">(current)</span>{% endif %}</a>
{% endif %}
</li>
{% endfor %}
<li class="page-item">
<a class="page-link" href="{{ site.paginate_path | relative_url | replace: ':num', paginator.total_pages }}" aria-label="Last Page">
<span aria-hidden="true">»</span>
<span class="sr-only">Last Page</span>
</a>
</li>
</ul>
</nav>
{% endif %}