forked from nineya/halo-theme-dream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archives.ftl
40 lines (40 loc) · 2.01 KB
/
archives.ftl
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
<#include "template/layout.ftl">
<@layout title="归档 - ${blog_title!}" canonical="${archives_url!}">
<#if (archives)?? && archives?size gt 0>
<#list archives as archive>
<div class="card card-content">
<div class="timeline-title">${archive.year?c}</div>
<div class="timeline">
<#list archive.posts as post>
<article class="media">
<#if post.thumbnail?? && post.thumbnail!=''>
<a href="${post.fullPath}" class="media-left">
<img class="not-gallery" src="${post.thumbnail!}" alt="${post.title!}">
</a>
</#if>
<div class="media-content">
<time datetime="${post.createTime!}">${post.createTime?string('yyyy-MM-dd')}</time>
<a href="${post.fullPath!}" class="title has-link-grey">${post.title!}</a>
<#if post.categories?? && post.categories?size gt 0>
<p>
<#list post.categories as category>
<a class="has-link-grey"
href="${category.fullPath!}">${category.name!}</a>
</#list>
</p>
</#if>
</div>
</article>
</#list>
</div>
</div>
</#list>
<#include "template/main/pagination.ftl">
<@pagination method="archives" datas=posts display="${settings.page_number!5}" />
<#else>
<div class="card card-empty">
<i class="fa fa-inbox"></i>
还没有发表过文章,回<a href="${context!}">主页</a>看看吧
</div>
</#if>
</@layout>