forked from halo-dev/halo-theme-pinghsu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcategory.ftl
62 lines (61 loc) · 2.59 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
61
62
<#include "header.ftl">
<#import "functions.ftl" as fun>
<@header title="分类:${category.name!} | ${blog_title!}"></@header>
<div class="main-content common-page clearfix">
<div class="common-item">
<div class="common-title">
Category : ${category.name!}
</div>
<div class="post-lists">
<div class="post-lists-body">
<#if posts?? && posts.content?size gt 0>
<#list posts.content as post>
<div class="post-list-item">
<div class="post-list-item-container <#if settings.post_color!false>bg-<@fun.randBgColor/></#if>">
<div class="item-label <#if settings.post_color!false>bg-<@fun.randBgColor/></#if>">
<div class="item-title"><a href="${post.fullPath!}">${post.title!}</a></div>
<div class="item-meta clearfix">
<div class="item-meta-ico bg-ico-<@fun.randBgIco/>" style="background: url(${theme_base!}/source/images/bg-ico.png) no-repeat;background-size: 40px auto;"></div>
<div class="item-meta-date"> ${post.createTime?string('MMM d,yyyy')} </div>
</div>
</div>
</div>
</div>
</#list>
<#else>
<div class="post-list-item">没有找到内容,请换别的关键字进行检索</div>
</#if>
</div>
</div>
</div>
<div class="lists-navigator clearfix">
<#if posts.totalPages gt 1>
<ol class="page-navigator">
<@paginationTag method="categoryPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${category.slug!}">
<#if pagination.hasPrev>
<li class="pre">
<a href="${pagination.prevPageFullPath!}">←</a>
</li>
</#if>
<#list pagination.rainbowPages as number>
<#if number.isCurrent>
<li class="current">
<a href="${number.fullPath!}">${number.page!}</a>
</li>
<#else>
<li>
<a href="${number.fullPath!}">${number.page!}</a>
</li>
</#if>
</#list>
<#if pagination.hasNext>
<li class="next">
<a href="${pagination.nextPageFullPath!}">→</a>
</li>
</#if>
</@paginationTag>
</ol>
</#if>
</div>
</div>
<#include "footer.ftl">