-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy patharchive.html
40 lines (36 loc) · 1.43 KB
/
archive.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
{% extends 'base.html' %}
{% set total_posts = get_posts(limit=3000, sort='desc') %}
{% set entries = group(total_posts, 'date:year', True) %}
{% block content %}
<div class="mid-col">
<div class="mid-col-container">
<div id="content" class="inner">
{% for year, posts in entries %}
<section class="archives"><h1 class="year">{{ year }}</h1>
{% for post in posts %}
<article>
<div class="meta">
<span class="date">{{ post.date | date("%Y-%m-%d") }}</span>
<br>
<span class="tags">
{% if post.tags %}
{% for tag in post.tags %}
<a class='category' href="/tags/{{ tag }}">{{ tag }}</a>
{% endfor %}
{% endif %}
</span>
</div>
{% if post.metadata.link %}
<h1 class="title">[链接]<a href="{{post.metadata.link}}" target="_blank">{{ post.title }}</a></h1>
{% else %}
<h1 class="title"><a href="{{ post.url }}">{{ post.title }}</a></h1>
{% endif %}
</article>
{% endfor %}
</section>
{% endfor %}
</div>
</div>
{% include 'include/footer.html' %}
</div>
{% endblock %}