-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.html
46 lines (45 loc) · 1.74 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
index: true
---
<!-- Blog Posts -->
{% for post in paginator.posts %}
</br>
<h3><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
<p><i class="fa fa-calendar"></i> {{ post.date | date: "%b %-d, %Y" }} Post By: {{post.author}}</p>
{% if post.content contains '<!-- more -->' %}
<p>{{ post.content | split:'<!-- more -->' | first }}
<a href="{{ post.url | prepend: site.baseurl }}">Read More</a>
</p>
{% else %}
{{ post.content }}
{% endif %}
{% endfor %}
<!-- Pagination links -->
{% 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: '//', '/' }}" aria-label="Next">
<span aria-hidden="true">«</span>
<span class="sr-only">Previous</span>
</a>
</li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if 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>
<span class="sr-only">Next</span>
</a>
</li>
{% endif %}
</ul>
{% endif %}