generated from halo-dev/halo-theme-quick-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
categories.ftl
87 lines (87 loc) · 4.69 KB
/
categories.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
84
85
86
87
<#--
/**
* 主题的分类目录,用来展示所有的标签,需要手动在菜单中添加
* 菜单链接如下: https://{youraddress}/categories
* @author LIlGG
*/
-->
<#include "header.ftl">
<@header title="${options.categories_title?default('文章分类')} - ${blog_title!}">
<#if (settings.patternimg!true) && (settings.category_patternimg?? && settings.category_patternimg!='') || ((metas.ri?boolean)!true && settings.rimage_cover_sheet_open!true && settings.rimage_url?? && settings.rimage_url!='')>
<div class="pattern-center-blank"></div>
<div class="pattern-center">
<div class="pattern-attachment-img">
<#if (settings.patternimg!true) && (settings.category_patternimg?? && settings.category_patternimg!='')>
<img data-src="${settings.category_patternimg!}" src="${res_base_url!}/source/images/svg/loader/orange.progress-bar-stripe-loader.svg" class="lazyload" onerror="imgError(this, IMG_Type.DEFAULT)">
<#else>
<img
src="${settings.rimage_url!}?category=category&type=url&itype=${settings.rimage_cover_itype!}<#if settings.rimage_cover_itype != 'image'>&id=${(settings.rimage_cover_id)!''}</#if>"
srcset="<#if settings.rimage_cover_lqip == 'loading'>${res_base_url!}/source/images/svg/loader/orange.progress-bar-stripe-loader.svg<#else>${settings.rimage_url!}?category=category&type=url&itype=${settings.rimage_cover_itype!}<#if settings.rimage_cover_itype != 'image'>&id=${(settings.rimage_cover_id)!''}</#if>&th=150</#if>"
data-srcset="${settings.rimage_url!}?category=category&type=url&itype=${settings.rimage_cover_itype!}<#if settings.rimage_cover_itype != 'image'>&id=${(settings.rimage_cover_id)!''}</#if>&th=640 640w,
${settings.rimage_url!}?category=category&type=url&itype=${settings.rimage_cover_itype!}<#if settings.rimage_cover_itype != 'image'>&id=${(settings.rimage_cover_id)!''}</#if>&th=960 960w,
${settings.rimage_url!}?category=category&type=url&itype=${settings.rimage_cover_itype!}<#if settings.rimage_cover_itype != 'image'>&id=${(settings.rimage_cover_id)!''}</#if>&th=1280 1280w,
${settings.rimage_url!}?category=category&type=url&itype=${settings.rimage_cover_itype!}<#if settings.rimage_cover_itype != 'image'>&id=${(settings.rimage_cover_id)!''}</#if> 1440w"
data-sizes="auto"
class="lazyload<#if settings.rimage_cover_lqip == 'lowquality'> blur-up</#if>" />
</#if>
</div>
<header class="pattern-header">
<#if options.categories_title?default("")?trim?length gt 1>
<h1 class="entry-title">${options.categories_title}</h1>
<#else>
<h1 class="entry-title i18n" data-iname="page.categories.title"></h1>
</#if>
</header>
</div>
<#else>
<div class="blank"></div>
<header class="entry-header">
<#if options.categories_title?default("")?trim?length gt 1>
<h1 class="entry-title">${options.categories_title}</h1>
<#else>
<h1 class="entry-title i18n" data-iname="page.categories.title"></h1>
</#if>
</header><!-- .entry-header -->
</#if>
</@header>
<div class="tag-contents">
<div id="tags" class="container chip-container" style="margin-top: 0px;">
<div class="card">
<div class="card-content">
<div class="tag-title center-align">
<i class="fa fa-bookmark"></i> <span class="i18n" data-iname="page.categories.title"></span>
</div>
<div class="tag-chips">
<@categoryTag method="list">
<#list categories as category>
<a href="${category.fullPath!}" title="${category.name!}: ${category.postCount!}">
<span class="chip center-align waves-effect waves-light chip-default" data-tagname="${category.name!}">${category.name!}
<span class="tag-length">${category.postCount!}</span>
</span>
</a>
</#list>
</@categoryTag>
</div>
</div>
</div>
</div>
</div>
<#if settings.category_radar!true>
<style type="text/css">
.tag-contents {
margin-top: 14px;
}
#category-echarts {
width: 100%;
height: 360px;
}
</style>
<div class="tag-contents category-show">
<div class="card">
<div id="category-echarts"></div>
</div>
</div>
</#if>
<#include "footer.ftl">
<@footer>
</@footer>