-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·41 lines (39 loc) · 1.9 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
---
layout: default
title: About Coder | Light, Bright, Sky – Talk About Development
sitemap:
changefreq: 'daily'
priority: 1.0
---
<div class="yearly-archive archive-page">
{% for post in paginator.posts %}
{% unless post.next %}<h2>{{ post.date | date: '%Y' }}</h2>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}<h2>{{ post.date | date: '%Y' }}</h2>
{% endif %}
{% endunless %}<p><a href="{{ site.baseurl }}{{ post.url }}" target="_blank">{{ post.title }}</a> <span class='category-tag'>[{{ post.categories }}]</span><span
class='date'>{{post.date | date: "%m月 %d日"}}</span></p>
{% endfor %}
</div>
<div class="pagination">
{% if paginator.total_pages > 1 %}
<!-- 分页代码 -->
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="smallbutton lightgray left"><i class="fa fa-chevron-left"></i><span>Older Posts</span></a>
{% endif %}
<!-- {% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="active">{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %} -->
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="smallbutton lightgray right"><span>Newer Posts</span><i class="fa fa-chevron-right"></i></a>
{% endif %}
{% endif %}
</div>