forked from halo-dev/theme-casper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchives.ftl
83 lines (71 loc) · 3.3 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<#include "default.ftl">
<@default title="全部文章 | ${options.blog_title!}" keyword="${options.seo_keywords!}" desc="${options.seo_desc!}" canonical="${options.blog_url}/archives" body_class="page-template">
<#-- The tag above means: insert everything in this file
into the {body} of the default.hbs template -->
<#-- The big featured header, it uses blog cover image as a BG if available -->
<header class="site-header outer">
<div class="inner">
<#include "partials/site-nav.ftl">
</div>
</header>
<#-- Everything inside the #post tags pulls data from the post -->
<main id="site-main" class="site-main outer">
<div class="inner">
<article class="post-full post page <#if !options.casper_general_archives_cover??>no-image</#if>">
<header class="post-full-header">
<h1 class="post-full-title">全部文章</h1>
</header>
<#if options.casper_general_archives_cover??>
<figure class="post-full-image" style="background-image: url(${options.casper_general_archives_cover})">
</figure>
</#if>
<section class="post-full-content">
<div class="post-content">
<h1>分类</h1>
<ul>
<@commonTag method="categories">
<#list categories as category>
<li>
<a href="${options.blog_url}/categories/${category.cateUrl}">${category.cateName}(${category.posts?size})</a>
</li>
</#list>
</@commonTag>
</ul>
<h1>标签</h1>
<ul>
<@commonTag method="tags">
<#list tags as tag>
<li>
<a href="${options.blog_url}/tags/${tag.tagUrl}">${tag.tagName}(${tag.posts?size})</a>
</li>
</#list>
</@commonTag>
</ul>
<h1>归档</h1>
<@articleTag method="archives">
<#list archives as archive>
<h2>${archive.year}年${archive.month}月</h2>
<ul class="listing">
<#list archive.posts?sort_by("postDate")?reverse as post>
<li>
${post.postDate?string('MM月dd日')}:<a href="${options.blog_url}/archives/${post.postUrl}"><#if post.originalType="1">[原]<#elseif post.originalType="2">[转]</#if>${post.postTitle}</a>
</li>
</#list>
</ul>
</#list>
</@articleTag>
</div>
</section>
</article>
</div>
</main>
<#-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs -->
</@default>
<@scripts>
<script>
$(function() {
var $postContent = $(".post-full-content");
$postContent.fitVids();
});
</script>
</@scripts>