-
-
Notifications
You must be signed in to change notification settings - Fork 275
/
index.html
71 lines (66 loc) · 2.53 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
67
68
69
70
71
---
layout: default
---
<div class="home py-4 py-md-5">
<div class="row">
{% for post in paginator.posts %}
<div class="col-12 col-md-6 col-lg-4">
<a href="{{ post.url | prepend: site.baseurl }}" class="index-anchor">
<div class="card rounded overflow-hidden">
<div class="image">
{% if post.image %}
<img src="{{post.image | relative_url}}" alt="{{post.title}}">
{% endif %}
<div class="card-body">
<h2 class="panel-title">{{ post.title | truncate: 25 }}</h2>
<p class="p-0 my-1 mx-0"><span class="post-meta"><small>{{ post.date | date: "%b %-d, %Y" }}</small></span></p>
<p>{{ post.excerpt | strip_html | strip_newlines | truncate: 150 }}</p>
</div>
</div>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-4">
{% if paginator.total_pages > 1 %}
<ul class="pagination">
{% if paginator.previous_page %}
<li class="page-item">
<a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Prev</a>
</li>
{% else %}
<li class="page-item disabled">
<span class="page-link">Previous</span>
</li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li class="page-item active">
<span class="page-link">{{ page }}</span>
</li>
{% elsif page == 1 %}
<li class="page-item">
<a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li class="page-item">
<a class="page-link" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next »</a>
</li>
{% else %}
<li class="page-item" disabled>
<span class="page-link">Next</span>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>
</div>