-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
53 lines (48 loc) · 1.69 KB
/
index.html
File metadata and controls
53 lines (48 loc) · 1.69 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
52
53
---
layout: index
title: "Home Page"
image:
feature: abstract-1.jpg
---
<!-- This loops through the paginated posts -->
<section id="posts-list">
{% for post in paginator.posts %}
{% include post_preview.html %}
{% endfor %}
</section>
<!-- Pagination links -->
<div style="text-align:center;">
<ul class="pagination pagination-lg">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<li><a href="/">«</a></li>
<li><a href="/">‹</a></li>
{% else %}
<li><a href="/">«</a></li>
<li><a href="/page{{paginator.previous_page}}/">‹</a></li>
{% endif %}
{% else %}
<li class="disabled"><a href="/">«</a></li>
<li class="disabled"><a href="#">‹</a></li>
{% endif %}
{% if paginator.page == 1 %}
<li class="active"><a href="#">1</a></li>
{% else %}
<li><a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">1</a></li>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<li class="active"><a href="#">{{ count }}</a></li>
{% else %}
<li><a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', count }}">{{ count }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li><a href="/page{{paginator.next_page}}/">›</a></li>
<li><a href="/page{{paginator.total_pages}}/">»</a></li>
{% else if paginator.page == paginator.total_pages %}
<li class="disabled"><a href="#">›</a></li>
<li class="disabled"><a href="#">»</a></li>
{% endif %}
</ul>
</div>