-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.html
43 lines (42 loc) · 1.69 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
---
layout: default
---
<div class="col-md-9">
{% for post in paginator.posts %}
<h3 class="title"><a href="{{ post.url }}">{{ post.title }}</a><time class="small">{{ post.date | date: "%Y.%m.%d" }}</time></h3>
{% if post.content contains "<!-- more -->" %}
{{ post.content | split:'<!-- more -->' | first }}
{% else %}
{{ post.content | strip_html | truncate:50 }}
{% endif %}
{% endfor %}
<!-- Pagination links -->
<div class="pull-right">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="btn btn-primary btn-sm" href="/">Home</a>
<a class="btn btn-primary btn-sm" href="/">« Prev</a>
{% else %}
<a class="btn btn-primary btn-sm" href="/">Home</a>
<a class="btn btn-primary btn-sm" href="/page{{paginator.previous_page}}/">« Prev</a>
{% endif %}
{% else %}
<a class="btn btn-primary btn-sm disabled" href="/">Home</a>
<a class="btn btn-primary btn-sm disabled">« Prev</a>
{% endif %}
<a class="btn btn-primary btn-sm disabled">Page: {{paginator.page}} of {{paginator.total_pages}}</a></span>
{% if paginator.next_page %}
<a class="btn btn-primary btn-sm" href="/page{{paginator.next_page}}/">Next »</a>
<a class="btn btn-primary btn-sm" href="/page{{paginator.total_pages}}/">Last</a>
{% else if paginator.page == paginator.total_pages %}
<a class="btn btn-primary btn-sm disabled">Next »</a>
<a class="btn btn-primary btn-sm disabled">Last</a>
{% endif %}
</div>
</div>
<aside class="col-md-3 visible-lg visible-md">
{% include categories.html %}
{% include recently_posts.html %}
{% include recently_comments.html %}
{% include blogroll.html %}
</aside>