-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patharchives.html
52 lines (48 loc) · 1.15 KB
/
archives.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
---
layout: page
title: "Archives"
description: "博文归档"
header-img: "img/archives-bg.jpg"
---
<style>
@media screen and (min-width: 768px) {
.element {
display: table-cell;
vertical-align: middle;
float: none !important;
}
}
@media screen and (max-width: 767px) {
.row {
position: relative;
top: -20px;
margin-bottom: 10px;
}
hr {
margin-top: 0px;
}
.cb-title-top {
margin-top: 40px;
}
}
</style>
<div class="post-container cb-title-top">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul>
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}
<li>{{ post.date | date:"%b" }} <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>