-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
53 lines (47 loc) · 1.63 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
---
layout: home
title: Dosk 技术站
permalink_name: /home
comments: false
detail_image: ../assets/springhack.png
---
{% for post in paginator.posts %}
<li class="post-item">
{{ post.date | date: "%Y/%m/%d" }}
<a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>
{% if post.description %}
-- {{ post.description | strip_html | strip }}
{% else if post.excerpt %}
-- {{ post.excerpt | strip_html | strip }}
{% endif %}
</li>
{% endfor %}
<div class="flex-spacer"></div>
<div class="home-paginator">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="{{ site.url }}/" class="btn btn-outline">«</a>
{% else %}
<a href="{{ site.url }}/page{{paginator.previous_page}}" class="btn btn-outline">«</a>
{% endif %}
{% else %}
<button disabled="disabled" href="javascript:;" class="btn btn-outline">«</button>
{% endif %}
{% if paginator.page == 1 %}
<a href="javascript:;" class="active btn btn-outline">1</a>
{% else %}
<a href="{{ site.url }}/" class="btn btn-outline">1</a>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<a href="javascript:;" class="active btn btn-outline">{{count}}</a>
{% else %}
<a href="{{ site.url }}/page{{count}}" class="btn btn-outline">{{count}}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ site.url }}/page{{paginator.next_page}}" class="btn btn-outline">»</a>
{% else %}
<button disabled="disabled" href="javascript:;" class="btn btn-outline">»</button>
{% endif %}
</div>