forked from dbtek/paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (48 loc) · 1.92 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
---
layout: default
---
<div class="paper-home">
{% for post in paginator.posts %}
<div class="post">
<div class="header">
<h5 class="subheader">
{% assign d = post.date | date: "%d" | plus:'0' %}
{{ 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" }}
</h5>
<h1>{{ post.title }}</h1>
</div>
{{ post.content | truncatewords:75}}
<a class="mdl-button mdl-button--accent" href="{{ post.url | replace_first: '/', '' | prepend: site.baseurl | prepend: site.url }}">Read more</a>
</div>
{% endfor %}
<div class="mdl-grid pagination">
<div class="mdl-cell mdl-cell--4-col previous">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="mdl-button mdl-button--primary" href="{{ site.baseurl }}{{ prepend: site.url}}">← Newer</a>
{% else %}
<a class="mdl-button mdl-button--primary" href="{{ site.paginate_path | replace: ':num', paginator.previous_page | prepend: site.baseurl | prepend: site.url}}">← Newer</a>
{% endif %}
{% else %}
<a class="mdl-button mdl-button--primary" disabled>← Newer</a>
{% endif %}
</div>
<div class="mdl-cell mdl-cell--4-col indicator subheader">
Page {{ paginator.page }} / {{ paginator.total_pages }}
</div>
<div class="mdl-cell mdl-cell--4-col next">
{% if paginator.next_page %}
<a class="mdl-button mdl-button--primary" href="{{ site.paginate_path | replace: ':num', paginator.next_page | prepend: site.baseurl | prepend: site.url}}">Older →</a>
{% else %}
<a class="mdl-button mdl-button--primary" disabled>Older →</a>
{% endif %}
</div>
</div>
</div>