-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
93 lines (90 loc) · 2.78 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
layout: default
title: Web Debug
---
{% for post in paginator.posts %}
<div class="page-content">
<div class="post-heading">
<a href="{{ post.url }}">{{ post.title }}</a>
</div>
<div class="post-meta">
<span>
Date:
<a href="{{ post.url }}">{{ post.date | date_to_string }}</a>
</span>
<span><i class="fa fa-ellipsis-v"></i></span>
<span>
Category:
{% for cat in post.categories %}
<a href="/categories.html#{{ cat }}-ref">{{ cat }}</a>
{% endfor %}
</span>
<span><i class="fa fa-ellipsis-v"></i></span>
<span>
Tags:
{% for tag in post.tags %}
<a href="/tags.html#{{ tag }}-ref">{{ tag }}</a>
{% endfor %}
<span>
</div>
<div class="post-entry">
{{ post.content || split:'<!--more-->' | first }}
</div>
<div class="post-footer">
<div class="read-more">
<a href="{{ post.url }}">Continue...</a>
</div>
</div>
</div>
{% endfor %}
<div class="page-pagination">
<ul class="pagination">
<li><span>Pages:</span></li>
{% assign page_begin = paginator.page | minus: 5 %}
{% assign page_end = paginator.page | plus: 5 %}
{% if page_begin < 1 %}
{% assign page_begin = 1 %}
{% endif %}
{% if page_end > paginator.total_pages %}
{% assign page_end = paginator.total_pages %}
{% endif %}
<li><a href="/">First</a></li>
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<li><a href="/">←</a></li>
{% else %}
<li><a href="/page{{paginator.previous_page}}">←</a></li>
{% endif %}
{% endif %}
{% if 6 < paginator.page %}
<li><a class="disabled">...</a></li>
{% endif %}
{% for count in (page_begin..page_end) %}
{% if 1 == count %}
{% if paginator.page == 1 %}
<li><a href="/" class="active">1</a></li>
{% else %}
<li><a href="/">1</a></li>
{% endif %}
{% else %}
{% if count == paginator.page %}
<li><a href="/page{{count}}" class="active">{{count}}</a></li>
{% else %}
<li><a href="/page{{count}}">{{count}}</a></li>
{% endif %}
{% endif %}
{% endfor %}
{% if page_end < paginator.total_pages %}
<li><a class="disabled">...</a></li>
{% endif %}
{% if paginator.next_page %}
<li><a class="next" href="/page{{paginator.next_page}}">→</a></li>
{% endif %}
{% if paginator.total_pages == 1 %}
<li><a href="/">Last</a></li>
{% else %}
<li><a href="/page{{paginator.total_pages}}">Last</a></li>
{% endif %}
<li><span>{{ paginator.total_posts }} posts in total</span></li>
</ul>
</div>