generated from halo-dev/halo-theme-quick-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag.ftl
65 lines (63 loc) · 3.92 KB
/
tag.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
<#--
/**
* 标签页
*/
-->
<#include "header.ftl">
<@header title="标签:${tag.name!} - ${blog_title!}">
<#if (settings.patternimg!true) && ((tag.thumbnail?? && tag.thumbnail!='') || (settings.tag_patternimg?? && settings.tag_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) && ((tag.thumbnail?? && tag.thumbnail!='') || (settings.tag_patternimg?? && settings.tag_patternimg!=''))>
<img class="lazyload" data-src='${((tag.thumbnail)?length>0)?string((tag.thumbnail),"${settings.tag_patternimg!}")}' src="${res_base_url!}/source/images/svg/loader/orange.progress-bar-stripe-loader.svg" onerror="imgError(this, IMG_Type.DEFAULT)">
<#else>
<img
src="${settings.rimage_url!}?tagid=${tag.id}&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!}?tagid=${tag.id}&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!}?tagid=${tag.id}&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!}?tagid=${tag.id}&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!}?tagid=${tag.id}&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!}?tagid=${tag.id}&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">
<h1 class="cat-title i18n" data-iname="page.tags.item.title" data-ivalue="${tag.name!}"></h1>
</header>
</div>
<#else>
<div class="blank"></div>
<style>
.toc-container {
top: 210px;
}
</style>
</#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) || !((tag.thumbnail?? && tag.thumbnail!='') || (settings.tag_patternimg?? && settings.tag_patternimg!=''))>
<header class="page-header">
<h1 class="cat-title">${tag.name!}</h1>
<span class="cat-des">
</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="tagPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${tag.slug!}">
<#include "layouts/list-nextprev.ftl">
</@paginationTag>
</div><!-- #primary -->
<#include "footer.ftl">
<@footer />