-
Notifications
You must be signed in to change notification settings - Fork 11
/
category.ftl
60 lines (59 loc) · 2.41 KB
/
category.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
<#--
@package Akina
-->
<#include "header.ftl">
<@header title="分类:${category.name!} - ${blog_title!}">
<#if (settings.patternimg!true) && (settings.category_patternimg?? && settings.category_patternimg!='')>
<div class="pattern-center">
<div class="pattern-attachment-img" style="background-image: url('${settings.category_patternimg!}')"> </div>
<header class="pattern-header">
<h1 class="cat-title">分类:${category.name!}</h1>
<span class="cat-des">${category.description!}</span>
</header>
</div>
<#else>
<div class="blank"></div>
</#if>
</@header>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<#if posts?? && posts.content?size gt 0>
<#if !(settings.patternimg!true) || !(settings.category_patternimg?? && settings.category_patternimg!='')>
<header class="page-header">
<h1 class="cat-title">${category.name!}</h1>
<span class="cat-des">
${category.description!}
</span>
</header><!-- .page-header -->
</#if>
<#-- Start the Loop -->
<#list posts.content as post>
<#include "tpl/content.ftl">
</#list>
<div class="clearer"></div>
<#else>
<#include "tpl/content-none.ftl">
</#if>
</main><!-- #main -->
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
<#if (settings.pagenav_style!'ajax') == 'ajax'>
<div id="pagination">
<#if pagination.hasNext>
<a href="${pagination.nextPageFullPath!}" class="">下一页</a>
<#else>
<span>没有更多文章了</span>
</#if>
</div>
<#else>
<nav class="navigator">
<#if pagination.hasPrev>
<a href="${pagination.prevPageFullPath!}"><i class="iconfont"></i></a>
</#if>
<#if pagination.hasNext>
<a href="${pagination.nextPageFullPath!}"><i class="iconfont"></i></a>
</#if>
</nav>
</#if>
</@paginationTag>
</div><!-- #primary -->
<#include "footer.ftl">