-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (44 loc) · 1.8 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
---
layout: default
title: Home
---
{% for post in paginator.posts %}
<article>
<h2><a href="{{site.baseurl}}{{post.url}}">{{ post.title }}</a></h2>
<div class="date"> <i class="fa fa-clock-o"></i>
<time datetime="{{post.date|date:"%F"}}">{% assign d = post.date | date: "%-d" %}
{{ post.date | date: "%B" }}
{% case d %}
{% when '1' or '21' or '31' %}{{ d }}st
{% when '2' or '22' %}{{ d }}nd
{% when '3' or '23' %}{{ d }}rd
{% else %}{{ d }}th
{% endcase %},
{{ post.date | date: "%Y" }}</time></div>
{% if post.tags.size > 0 %}<div class="tags">{%if post.tags.size > 1 %}<i class="fa fa-tags"></i>{% else %}<i class="fa fa-tag"></i>{% endif %}{% for tag in post.tags %}<span class="tag">{{ tag }}</span>{% endfor %}</div>{% endif %}
</article>
{% endfor %}
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div id="pagination">
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a href="/"><i class="fa fa-arrow-circle-o-left"></i></a>
{% else %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}"><i class="fa fa-arrow-circle-o-left"></i></a>
{% endif %}
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<em>•</em>
{% elsif page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}">•</a>
{% else %}
<a href="/{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">•</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}"><i class="fa fa-arrow-circle-o-right"></i></a>
{% endif %}
</div>
{% endif %}