forked from freaks-dev/taste-fdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.hbs
151 lines (141 loc) · 6.33 KB
/
page.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{{> head}}
{{> navbar}}
<main class="page">
<div class="wrapper">
{{#if @customHTML.beforePage}}
<div class="banner banner--before-content">
{{{@customHTML.beforePage }}}
</div>
{{/if}}
{{#page}}
<article class="content">
<header class="content__header">
<h1 class="content__title">
{{title}}
</h1>
{{#checkIfAny @config.page.displayAuthor @config.page.displayDate @config.page.displayComments}}
<div class="content__meta">
{{#if @config.page.displayAuthor}}
<div class="content__author">{{ translate 'post.publishedBy' }}
{{#author}}
<a href="{{url}}" class="invert" rel="author" title="{{name}}">{{name}}</a>
{{/author}}
</div>
{{/if}}
{{#if @config.page.displayDate}}
<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.page.displayComments}}
<div class="content__comments">
<a href="{{url}}#comments" rel="nofollow" aria-label="{{ translate 'common.comments' }}">
<svg aria-hidden="true">
<title>{{ translate 'common.comments' }}</title>
<use xlink:href="{{@website.assetsUrl}}/svg/svg-map.svg#comments"/>
</svg>
</a>
</div>
{{/if}}
</div>
{{/checkIfAny}}
</header>
{{#featuredImage}}
{{#if url}}
<figure class="content__featured-image">
<img
src="{{url}}"
{{#if @config.site.responsiveImages}}
{{responsiveImageAttributes 'featuredImage' srcset sizes}}
{{/if}}
{{ lazyload "eager" }}
height="{{height}}"
width="{{width}}"
alt="{{alt}}">
{{#checkIfAny caption credits}}
<figcaption>
{{caption}}
{{credits}}
</figcaption>
{{/checkIfAny}}
</figure>
{{/if}}
{{/featuredImage}}
<div class="content__inner">
<div class="content__entry">
{{{text}}}
</div>
{{#checkIfAny @config.page.displayLastUpdatedDate @config.page.displayShareButtons @config.page.displayAuthorBio}}
<footer>
{{#if @config.page.displayLastUpdatedDate}}
{{#if modifiedAt}}
<p class="content__last-updated">
{{ translate 'post.lastUpdatedDate' }}
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
{{date modifiedAt @config.custom.formatDate}}
{{else}}
{{date modifiedAt @config.custom.formatDateCustom}}
{{/checkIf}}
</p>
{{/if}}
{{/if}}
{{#if @config.page.displayShareButtons}}
<div class="content__tags-share">
{{#checkIfAll @plugins.socialSharing @plugins.socialSharing.state}}
<aside class="content__share">
{{{@customSocialSharing}}}
</aside>
{{else}}
<aside class="content__share">
{{> share-buttons}}
</aside>
{{/checkIfAll}}
</div>
{{/if}}
{{#if @config.page.displayAuthorBio}}
{{#author}}
<div class="content__bio bio">
{{#if avatar}}
<img
src="{{avatarImage.url}}"
{{ lazyload "lazy" }}
height="{{avatarImage.height}}"
width="{{avatarImage.width}}"
class="bio__avatar"
alt="{{avatarImage.alt}}">
{{/if}}
<div>
{{#if name}}
<h3 class="h6 bio__name">
<a href="{{url}}" class="invert" title="{{name}}">{{name}}</a>
</h3>
{{/if}}
{{#if description}}
<div class="bio__desc">{{{description}}}</div>
{{/if}}
</div>
</div>
{{/author}}
{{/if}}
</footer>
{{/checkIfAny}}
</div>
</article>
{{/page}}
{{#if @config.page.displayComments}}
<div class="comments-area content__inner" id="comments">
{{{@commentsCustomCode}}}
</div>
{{/if}}
{{#if @customHTML.afterPage}}
<div class="banner banner--after-content">
{{{@customHTML.afterPage}}}
</div>
{{/if}}
</div>
</main>
{{> footer}}