forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (55 loc) · 2.41 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
---
layout: default
---
<div class="posts">
{% for post in paginator.posts %}
<div class="media post">
{% if post.image %}
<div class="media-left">
<a href="#">
<img class="media-object" src="post.image" alt="Image of {{ post.title }}">
</a>
</div>
{% endif %}
<div class="media-body">
<h2 class="media-heading"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h2>
<span class="badge post-date">{{ post.date | date: "%B %e, %Y" }}</span>
{{ post.excerpt }}
</div>
</div>
{% comment %}
<article class="post">
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> <span class="post-date">{{ post.date | date: "%B %e, %Y" }}</span></h1>
<div class="entry">
{{ post.excerpt }}
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endcomment %}
{% endfor %}
</div>
{% if paginator.total_pages > 1 %}
<nav id="posts-pagination">
<ul class="pagination justify-content-center">
{% if paginator.previous_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
{% else %}
<li class="page-item disabled"><a class="page-link" href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li class="page-item active"><a class="page-link" href="#">{{ page }} <span class="sr-only">(current)</span></a></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: '//', '/' }}" aria-label="Next"><span aria-hidden="true">»</span></a></li>
{% else %}
<li class="page-item disabled"><a class="page-link" href="#" aria-label="Next"><span aria-hidden="true">»</span></a></li>
{% endif %}
</ul>
</nav>
{% endif %}