-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtag.hbs
executable file
·102 lines (98 loc) · 3.88 KB
/
tag.hbs
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{{> head}}
{{> navbar}}
<main class="main">
<div class="main__left">
{{#tag}}
{{#featuredImage}}
{{#if url}}
<figure class="hero">
<img
src="{{url}}"
{{#if @config.site.responsiveImages}}
{{responsiveImageAttributes 'tagImage' srcset sizes}}
{{/if}}
{{ lazyload "eager" }}
height="{{height}}"
width="{{width}}"
alt="{{alt}}">
{{#checkIfAny caption credits}}
<figcaption class="hero__caption">
{{caption}}
{{credits}}
</figcaption>
{{/checkIfAny}}
</figure>
{{else}}
{{#checkIfAll @config.custom.uploadHero @config.custom.displayHeroImage}}
<figure class="hero">
<img
src="{{@config.custom.uploadHero}}"
{{#if @config.site.responsiveImages}}
{{responsiveImageAttributes @config.custom.uploadHero}}
{{/if}}
{{ lazyload "eager" }}
{{imageDimensions @config.custom.uploadHero}}
alt="{{@config.custom.uploadHeroAlt}}">
{{#if @config.custom.uploadHeroCaption}}
<figcaption class="hero__caption">
{{@config.custom.uploadHeroCaption}}
</figcaption>
{{/if}}
</figure>
{{/checkIfAll}}
{{/if}}
{{/featuredImage}}
<header>
<h1>{{name}}
<sup>({{postsNumber}})</sup>
</h1>
{{#if description}}
<p>
{{description}}
</p>
{{/if}}
</header>
{{/tag}}
</div>
<div class="main__right feed tag">
<div>
{{#each posts}}
<article class="feed__item">
<header>
<h2>
<a href="{{url}}">
{{title}}
</a>
</h2>
{{#checkIfAny @config.custom.listingDate @config.custom.listingAuthor}}
<div class="post__meta">
{{#if @config.custom.listingDate}}
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
{{date createdAt @config.custom.formatDate}}
{{else}}
{{date createdAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
{{/if}}
{{#if @config.custom.listingAuthor}}
{{ translate 'common.publishedBy' }}
{{#author}}
<a href="{{url}}">{{name}}</a>
{{/author}}
{{/if}}
</div>
{{/checkIfAny}}
</header>
{{#if hasCustomExcerpt}}
{{{ excerpt }}}
{{else}}
<p>{{{ excerpt }}}</p>
{{/if}}
</article>
{{/each}}
{{> pagination}}
</div>
</div>
</main>
{{> footer}}