-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (56 loc) · 1.89 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
---
layout: default
---
<div class="home">
<h2>Total : {{site.posts | size}} blogs</h2>
<ul class="post-list">
{% for post in paginator.posts %}
<li style="margin-bottom:0px">
<p style="font-size: 1.1em;margin-bottom:10px;">
<span class="post-meta">
<!-- jekyll-liquid, 对ruby的封装,只能使用封装完的, github pages中不让运行ruby代码-->
<!-- liquid语法, https://learn.cloudcannon.com/jekyll-liquid/ -->
{% if forloop.rindex <10 %}
0x0{{forloop.rindex}}
{% else %}
0x{{forloop.rindex}}
{% endif %}
</span>
<span class="post-meta">
{{ post.date | date: "%Y/%m/%d" }} -
</span>
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</p>
</li>
{% endfor %}
<li>
<span class="post-meta">
[archive]
</span>
<a href="/some-test-page-index.html">html-js-learn-test-page-archive</a>
</li>
</ul>
<div class="pagination" style="font-size: 20pt;">
{% if paginator.total_pages > 1 %}
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="/" style="border-bottom: dotted orange;">pre</a>
{% else %}
<a href="{{ paginator.previous_page_path }}" style="border-bottom: dotted orange;">pre</a>
{% endif %}
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="active">{{ page }}</span>
{% elsif page == 1 %}
<a href="/">{{ page }}</a>
{% else %}
<a href="/page{{page}}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" style="border-bottom: dotted orange;">next</a>
{% endif %}
{% endif %}
</div>
</div>