forked from supernarsi/jeklly-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.html
33 lines (31 loc) · 1.26 KB
/
category.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
---
layout: home
---
<div class="index_content tech">
<div class="section">
<ul class="article_cate">
<li><a href="/"><span>首页</span></a></li>
<li class="on" style="text-align:center"><a href="/tech"><span>归档</span></a></li>
<li style="text-align:right; float:right;"><a href="/about.html"><span>关于</span></a></li>
</ul>
<div class="cate_bar"><span id="cateBar"></span></div>
<div id="category_all">
<ul class="category_list">
{% for post in site.posts %}
{% unless post.next %}
<div class="category_year">{{ post.date | date: '%Y' }}</div>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<div class="category_year">{{ post.date | date: '%Y' }}</div>
{% endif %}
{% endunless %}
<li class="article">
<span class="datetime">{{ post.date | date:"%m %d, %Y" }}</span> »
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>