-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpost.hbs
218 lines (191 loc) · 8.56 KB
/
post.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
{{!< default}}
<main class="site__content">
{{#post}}
<article class="article {{#has tag="#cover"}}article--cover{{/has}}">
<header
class="
section
section--roomy-bottom
{{#has tag="#cover"}}
background-dark
cover
cover--full-page
{{#has tag="#cover-precomposed"}}
cover--precomposed
{{/has}}
{{#has tag="#cover-object-light"}}
cover--object
cover--object--light
{{/has}}
{{#has tag="#cover-object-medium"}}
cover--object
cover--object--medium
{{/has}}
{{#has tag="#cover-object-dark"}}
cover--object
cover--object--dark
{{/has}}
{{#has tag="bootstrap"}}
cover--bootstrap
{{/has}}
{{else}}
background-alternate
{{/has}}
print-padding-none
"
>
<div class="{{#has tag="#cover"}}cover__text{{/has}}">
<div class="container {{^has tag="#cover"}}container--article{{/has}}">
<div class="article__meta spacing-bottom-small">
<time datetime="{{date format="YYYY-MM-DD"}}">
{{date format="D. MMMM YYYY"}}
</time>
—
{{#if tags}}
<ul class="article__tags list-inline list-unstyled spacing-bottom-none">
{{#foreach tags from="2"}}
<li>
<a
href="{{url}}"
{{#has slug="spoluprace"}}
class="label label--warning"
{{/has}}
>{{name}}</a>{{#unless @last}},{{/unless}}
</li>
{{/foreach}}
</ul>
{{/if}}
—
<span class="text-nowrap">
{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}
</span>
</div>
<h1 class="article__title js-nbsp">{{title}}</h1>
<h2 class="article__summary js-nbsp">{{excerpt}}</h2>
<div class="article__author">
{{#has author="count:>1"}}
{{> "byline-multiple"}}
{{else}}
{{> "byline-single"}}
{{/has}}
</div>
</div>
</div>
{{#has tag="#cover"}}
{{#if feature_image}}
<figure class="cover__canvas print-hidden">
<img
src="{{img_url feature_image size="xl"}}"
srcset="
{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w,
{{img_url feature_image size="xxl"}} 4000w
"
sizes="100vw"
class="cover__image"
alt="{{title}}"
/>
</figure>
{{/if}}
{{/has}}
</header>
<div class="section section--roomy-bottom">
<div class="container container--article">
<div class="editor editor--long-text js-nbsp js-external-links js-heading-anchors">
{{content}}
</div>
<hr class="print-hidden" />
<div class="article__author spacing-bottom print-hidden">
{{#has author="count:>1"}}
{{> "byline-multiple"}}
{{else}}
{{> "byline-single"}}
{{/has}}
</div>
{{#get "posts"
filter="author:{{primary_author.slug}}+primary_tag:[clanky,slovnik]+id:-{{id}}"
include="tags"
order="published_at DESC"
limit="3"
as |more_posts_by_author|
}}
{{#if more_posts_by_author}}
<div class="print-hidden">
<h4>Další články od autora:</h4>
<ul class="js-nbsp">
{{#foreach more_posts_by_author visibility="public"}}
<li>
{{#has tag="Slovník"}}
<a href="/slovnik" class="link-unstyled color-muted">Slovník</a>
<span class="color-muted">/</span>
{{/has}}
<a href="{{url}}">{{title}}</a>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}
{{/get}}
{{#if tags}}
<div class="list-inline print-hidden">
<span class="text-small-block text-italic color-muted">Více k tématu:</span>
<nav>
<ul class="list-unstyled list-inline spacing-bottom-none">
{{#foreach tags from=2}}
<li>
<a
href="{{url}}"
class="
label
{{#has slug="spoluprace"}}
label--warning
{{/has}}
"
>{{name}}</a>
</li>
{{/foreach}}
</ul>
</nav>
</div>
{{/if}}
<hr class="print-hidden" />
{{> "share-and-comment"}}
</div>
</div>
</article>
{{^has tag="#no-bottom-ad"}}
{{> "bottom-ad"}}
{{/has}}
{{/post}}
{{#get "posts"
filter="primary_tag:{{post.primary_tag.slug}}+id:-{{post.id}}"
include="authors,tags"
order="published_at DESC"
limit="3"
as |recent|
}}
{{#if recent}}
{{> "related-posts" posts=recent}}
{{/if}}
{{/get}}
</main>
{{> "footer"}}
{{#contentFor "styles"}}
{{> "external/prism-css"}}
{{/contentFor}}
{{#contentFor "scripts"}}
{{> "external/prism-js"}}
{{/contentFor}}
{{#contentFor "snippets"}}
<template id="snippet__newsletter-signup__template">
{{> "snippets/newsletter-signup"}}
</template>
<template id="snippet__post-box-ad__template">
{{> "snippets/post-box-ad"}}
</template>
<template id="snippet__post-breakout-ad__template">
{{> "snippets/post-breakout-ad"}}
</template>
{{/contentFor}}