/
post.hbs
174 lines (151 loc) · 6.55 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
{{!< default}}
{{#post}}
<main class="site__content">
<article class="article">
<header
class="
section
section--dense
{{#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-dark"}}
cover--object
cover--object--dark
{{/has}}
{{#has tag="bootstrap"}}
cover--bootstrap
{{/has}}
{{else}}
background-alternate
{{/has}}
"
>
<div class="{{#has tag="#cover"}}cover__text{{/has}}">
<div class="container {{^has tag="#cover"}}container--article{{/has}}">
<div class="article__meta">
<time class="article__meta__date" datetime="{{date format="YYYY-MM-DD"}}">
{{date format="D. MMMM YYYY"}}
</time>
—
{{tags from=2}}
—
{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}
</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">
<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--dense">
<div class="container container--article">
<div class="editor js-nbsp js-external-links js-heading-anchors">
{{content}}
</div>
<hr />
<div class="share">
<span class="icon icon--in-text spacing-right-1">
{{> "icons/twitter"}}
</span>
<span class="icon icon--in-text spacing-right-2">
{{> "icons/facebook"}}
</span>
Líbí se vám článek? Sdílejte ho na
<a
href="https://twitter.com/intent/tweet?text={{encode title}}&url={{url absolute="true"}}&via=FrontendGarden"
target="_blank"
rel="noopener"
data-track="share"
data-method="Twitter"
>Twitteru</a>
nebo
<a
href="https://www.facebook.com/sharer.php?u={{url absolute="true"}}"
target="_blank"
rel="noopener"
data-track="share"
data-method="Facebook"
>Facebooku</a>.
</div>
</div>
</div>
<div class="section section--dense">
<div class="container container--article">
<h2>
Komentáře
<span class="badge">
<span class="fb-comments-count" data-href="{{url absolute="true"}}">0</span>
</span>
</h2>
<div class="comments">
<div
class="fb-comments"
data-href="{{url absolute="true"}}"
data-numposts="5"
></div>
</div>
</div>
</div>
</article>
{{#get "posts"
include="authors,tags"
filter="primary_tag:{{primary_tag.slug}}+id:-{{id}}"
limit="3"
as |recent|
}}
{{#if recent}}
{{> "related-posts" posts=recent}}
{{/if}}
{{/get}}
</main>
{{/post}}
{{> "footer"}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism-okaidia.min.css" />
{{/contentFor}}
{{#contentFor "scripts"}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
{{!-- Facebook SDK for comments --}}
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/cs_CZ/sdk.js#xfbml=1&version=v9.0" nonce="tE8SW7Mk"></script>
{{/contentFor}}
{{#contentFor "snippets"}}
<template id="snippet_newsletter-signup_template">
{{> "snippets/newsletter-signup"}}
</template>
{{/contentFor}}