-
-
Notifications
You must be signed in to change notification settings - Fork 467
Expand file tree
/
Copy pathposts.hbs
More file actions
executable file
·114 lines (113 loc) · 5.19 KB
/
Copy pathposts.hbs
File metadata and controls
executable file
·114 lines (113 loc) · 5.19 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
{{> head}}
{{> navbar}}
<main class="posts">
{{#if @config.custom.showHeader}}
<div class="hero hero--noimage">
<header class="hero__content {{#checkIf @config.custom.alignHero '==' "center" }}hero__content--centered{{/checkIf}}">
<div class="wrapper">
<h1>
{{ translate 'postPrefix.title' }}
</h1>
<p class="page__desc">
{{ translate "postPrefix.description" }}
</p>
</div>
</header>
</div>
{{/if}}
<div class="wrapper feed">
{{#each posts}}
<article class="feed__item {{#checkIf @config.custom.alignFeed '==' "center" }}feed__item--centered{{/checkIf}}">
{{#if @config.custom.feedFeaturedImage}}
{{#featuredImage}}
{{#if url}}
<figure class="feed__image">
<img
src="{{url}}"
{{#if @config.site.responsiveImages}}
{{responsiveImageAttributes 'featuredImage' srcset.feed sizes.feed}}
{{/if}}
{{ lazyload "lazy" }}
height="{{height}}"
width="{{width}}"
alt="{{alt}}">
</figure>
{{/if}}
{{/featuredImage}}
{{/if}}
<div class="feed__content">
<header>
{{#checkIfAny @config.custom.feedAvatar @config.custom.feedAuthor @config.custom.feedDate}}
<div class="feed__meta">
{{#author}}
{{#if @config.custom.feedAvatar}}
{{#if avatar}}
{{#if @config.custom.feedAuthor}}
<img
src="{{avatarImage.url}}"
{{ lazyload "lazy" }}
height="{{avatarImage.height}}"
width="{{avatarImage.width}}"
class="feed__author-thumb"
alt="">
{{else}}
<a href="{{url}}" class="feed__author-link">
<img
src="{{avatarImage.url}}"
{{ lazyload "lazy" }}
height="{{avatarImage.height}}"
width="{{avatarImage.width}}"
class="feed__author-thumb"
alt="{{avatarImage.alt}}">
</a>
{{/if}}
{{/if}}
{{/if}}
{{#if @config.custom.feedAuthor}}
<a href="{{url}}" class="feed__author">{{name}}</a>
{{/if}}
{{/author}}
{{#if @config.custom.feedDate}}
{{#checkIf @config.custom.feedDateType '==' "published" }}
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}" class="feed__date">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
{{date createdAt @config.custom.formatDate}}
{{else}}
{{date createdAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
{{/checkIf}}
{{#checkIf @config.custom.feedDateType '==' "modified" }}
<time datetime="{{date modifiedAt 'YYYY-MM-DDTHH:mm'}}" class="feed__date">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
{{date modifiedAt @config.custom.formatDate}}
{{else}}
{{date modifiedAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
{{/checkIf}}
{{/if}}
</div>
{{/checkIfAny}}
<h2 class="feed__title">
<a href="{{url}}">
{{title}}
</a>
</h2>
</header>
{{#if hasCustomExcerpt}}
{{{ excerpt }}}
{{else}}
<p>{{{ excerpt }}}</p>
{{/if}}
{{#if @config.custom.feedtReadMore}}
<a href="{{url}}" class="readmore feed__readmore">
{{ translate 'post.readMore' }}</a>
{{/if}}
</div>
</article>
{{/each}}
{{> pagination}}
</div>
</main>
{{> footer}}