-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpage.hbs
43 lines (40 loc) · 1.76 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
{{!< default}}
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
{{!-- The main content area on the static page --}}
<main class="main">
{{!-- Everything inside the #post tags pulls data from the page --}}
{{#post}}
<article class="{{post_class}}">
{{#match @page.show_title_and_feature_image}}
<header class="post-header">
<h1 class="post-title">{{title}}</h1>
{{#if tags}}
<div class="post-byline">
{{tags prefix=(t "Posted in ")}}
</div>
{{/if}}
{{#if feature_image}}
<figure class="post-image">
<img
srcset="{{img_url feature_image size="s" format="webp"}} 400w,
{{img_url feature_image size="m" format="webp"}} 600w,
{{img_url feature_image size="l" format="webp"}} 800w,
{{img_url feature_image size="xl" format="webp"}} 1200w"
sizes="(min-width: 850px) 760px, 100vw"
src="{{img_url feature_image size="l" format="webp"}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{/if}}"
loading="lazy"
/>
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}}
</figure>
{{/if}}
</header>
{{/match}}
<div class="post-content">
{{content}}
</div>
</article>
{{/post}}
</main>