-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.hbs
221 lines (180 loc) · 9.08 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
219
220
221
{{!< default}} {{!-- The tag above means: insert everything in this file into the {body} tag of the default.hbs template
--}} {{#post}} {{!-- Everything inside the #post block pulls data from the post --}} <main id="site-main"
class="site-main ">
<div class="post-details-page">
<div class="article-share">
<a href="/" class="back-link"><img src="{{asset "images/left-arrow.svg"}}" alt="arrow"> Back to all
posts</a>
<div class="share-section">
<h3>Share This Article</h3>
<div class="social-icons">
<a href="#" id="copyButton" class="icon-link tooltip" data-tooltip="Copy to clipboard" data-url="{{@site.url}}{{url}}
">
<img src="{{asset "images/share.svg"}}" alt="Link">
</a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{@site.url}}{{url}}"
onclick="window.open(this.href, '_blank', 'width=700,height=600'); return false;"
class="icon-link">
<img src="{{asset "images/facebook.svg"}}" alt="Facebook">
</a>
<a href="https://x.com/intent/post?text=Check%20out%20this%20great%20post%20by%20Kardinal%3A%20%E2%80%9C{{title}}%E2%80%9C - {{@site.url}}{{url}}"
onclick="window.open(this.href, '_blank', 'width=700,height=600'); return false;"
class="icon-link">
<img src="{{asset "images/x.svg"}}" alt="Twitter">
</a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url={{@site.url}}{{url}}"
onclick="window.open(this.href, '_blank', 'width=700,height=600'); return false;"
class="icon-link">
<img src="{{asset "images/linkedin.svg"}}" alt="LinkedIn">
</a>
</div>
</div>
<div class="subscribe-section">
<h3>Join our newsletter</h3>
<form class="subscribe-form">
<input type="email" placeholder="Enter your email" required>
<button type="submit">Subscribe</button>
</form>
</div>
{{!-- A signup call to action is displayed here, unless viewed as a logged-in member --}}
{{!-- {{#if @site.members_enabled}}
{{#unless @member}}
{{#unless @site.comments_enabled}}
{{#if access}}
<section class="footer-cta outer">
<div class="inner">
{{#if @custom.email_signup_text}}<h2 class="footer-cta-title">{{@custom.email_signup_text}}</h2>
{{/if}}
<a class="footer-cta-button" href="#/portal" data-portal>
<div class="footer-cta-input">Enter your email</div>
<span>Subscribe</span>
</a>
</div>
</section>
{{/if}}
{{/unless}}
{{/unless}}
{{/if}} --}}
</div>
<article class="article {{post_class}} {{#match @custom.post_image_style " Full"}}image-full{{else match
@custom.post_image_style "=" "Small" }}image-small{{/match}} article-details">
<header class="article-header gh-canvas article-head">
<div class="article-tag post-card-tags">
{{!-- {{#primary_tag}}
<span class="post-card-primary-tag">
<a href="{{url}}">{{name}}</a>
</span>
{{/primary_tag}} --}}
{{#if featured}}
<span class="post-card-featured">{{> "icons/fire"}} Featured</span>
{{/if}}
<time class="byline-meta-date" datetime="{{date format=" YYYY-MM-DD"}}">{{date}}</time>
{{#if reading_time}}
<span class="bull">•</span>
<span class="byline-reading-time">{{reading_time}}</span>
{{/if}}
</div>
<h1 class="hero__article-title article-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="article-excerpt">{{custom_excerpt}}</p>
{{/if}}
{{#match @custom.post_image_style "!=" "Hidden"}}
{{#if feature_image}}
<figure class="article-image">
<img 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"
sizes="(min-width: 1400px) 1400px, 92vw" src="{{img_url feature_image size=" xl"}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}" />
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}}
</figure>
{{/if}}
{{/match}}
<div class="article-byline">
<section class="article-byline-content">
<ul class="author-list instapaper_ignore">
{{#foreach authors}}
<li class="author-list-item">
{{#if profile_image}}
<a href="{{url}}" class="author-avatar" aria-label="Read more of {{name}}">
<img class="author-profile-image" src="{{img_url profile_image size=" xs"}}"
alt="{{name}}" />
</a>
{{else}}
<a href="{{url}}" class="author-avatar author-profile-image"
aria-label="Read more of {{name}}">{{> "icons/avatar"}}</a>
{{/if}}
</li>
{{/foreach}}
</ul>
<div class="article-byline-meta">
<h4 class="author-text">Published By</h4>
<div class="byline-meta-content">
<h4 class="author-name">
<a href="#" class="author-link"><span class="tag-name">{{authors}}</span></a> IN
{{#primary_tag}}
<a class="author-tag" href="{{url}}"><span class="tag-name">{{name}}</span></a>
{{/primary_tag}}
</h4> {{!-- <time class="byline-meta-date" datetime="{{date format="
YYYY-MM-DD"}}">{{date}}</time>
{{#if reading_time}}
<span class="byline-reading-time"><span class="bull">•</span>
{{reading_time}}</span>
{{/if}} --}}
</div>
</div>
</section>
</div>
</header>
<section class=" gh-content gh-canvas article-content">
{{content}}
</section>
{{#if comments}}
{{!-- <section class="article-comments gh-canvas">
{{comments}}
</section> --}}
{{/if}}
</article>
</div>
</main>
{{!-- A signup call to action is displayed here, unless viewed as a logged-in member --}}
{{!-- {{#if @site.members_enabled}}
{{#unless @member}}
{{#unless @site.comments_enabled}}
{{#if access}}
<section class="footer-cta outer">
<div class="inner">
{{#if @custom.email_signup_text}}<h2 class="footer-cta-title">{{@custom.email_signup_text}}</h2>{{/if}}
<a class="footer-cta-button" href="#/portal" data-portal>
<div class="footer-cta-input">Enter your email</div>
<span>Subscribe</span>
</a>
</div>
</section>
{{/if}}
{{/unless}}
{{/unless}}
{{/if}} --}}
{{!-- Read more links, just above the footer --}}
{{#if @custom.show_recent_posts_footer}}
{{!-- The {#get} helper below fetches some of the latest posts here
so that people have something else to read when they finish this one.
This query gets the latest 3 posts on the site, but adds a filter to
exclude the post we're currently on from being included. --}}
{{#get "posts" filter="id:-{{id}}" limit="3" as |more_posts|}}
{{#if more_posts}}
<aside class=" related-post read-more-wrap">
<p class="related-text">Related posts</p>
<div class="read-more inner">
{{#foreach more_posts}}
{{> "post-card"}}
{{/foreach}}
</div>
</aside>
{{/if}}
{{/get}}
{{/if}}
{{/post}}
{{> newsletter }}
</div>