-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (28 loc) · 1.01 KB
/
index.html
File metadata and controls
31 lines (28 loc) · 1.01 KB
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
---
layout: page
title: 主页
---
<img src="{{ site.url }}/static/img/page.jpg" alt="主题图" class="centered-image">
<div class="page page-index test">
{% for post in site.posts -%}
{%- capture post_year %}{{ post.date | date: "%Y" }}{% endcapture -%}
{%- capture post_previous_year %}{{ post.previous.date | date: "%Y" }}{% endcapture -%}
{%- capture post_next_year %}{{ post.next.date | date: "%Y" }}{% endcapture -%}
{%- if forloop.first or post_next_year != post_year -%}
<div class="list-post">
<h2 id="{{post_year}}">{{post_year}}</h2>
<ul>
{%- endif %}
<li>
<div class="name-date">
<div class="left-name"><a href="{{ site.baseurl | append: post.url }}" class="title hover-underline">{{
post.title }}</a></div>
<div class="right-date"><span class="date">{{ post.date | date: "%Y/%m/%d" }}</span></div>
</div>
</li>
{%- if forloop.last or post_previous_year != post_year %}
</ul>
</div>
{%- endif %}
{%- endfor %}
</div>