-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.hbs
77 lines (67 loc) · 3.02 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
{{!< default}}
{{#post}}
<main id="gh-main" class="gh-main">
<article class="gh-article {{post_class}}">
<header class="gh-article-header gh-canvas">
{{#is "post"}}
<span class="gh-article-meta">
{{#primary_author}}By <a href="{{url}}">{{name}}</a>{{/primary_author}}
{{#if primary_tag}}
in
<a class="gh-article-tag" href="{{primary_tag.url}}">{{primary_tag.name}}</a>
{{/if}}
—
<time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
</span>
{{/is}}
<h1 class="gh-article-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="gh-article-excerpt">{{custom_excerpt}}</p>
{{/if}}
{{#if feature_image}}
<figure class="gh-article-image">
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 720w,
{{img_url feature_image size="l"}} 960w,
{{img_url feature_image size="xl"}} 1200w,
{{img_url feature_image size="xxl"}} 2000w"
sizes="(max-width: 1200px) 100vw, 1200px"
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}}
</header>
<div class="gh-content gh-canvas">
{{content}}
</div>
{{#is "post"}}
<footer class="gh-article-footer gh-canvas">
<nav class="gh-navigation">
<div class="gh-navigation-previous">
{{#prev_post}}
<a class="gh-navigation-link" href="{{url}}">
<span class="gh-navigation-label">{{> icons/arrow-left}} Previous article</span>
<h4 class="gh-navigation-title">{{title}}</h4>
</a>
{{/prev_post}}
</div>
<div class="gh-navigation-middle"></div>
<div class="gh-navigation-next">
{{#next_post}}
<a class="gh-navigation-link" href="{{url}}">
<span class="gh-navigation-label">Next article {{> icons/arrow-right}}</span>
<h4 class="gh-navigation-title">{{title}}</h4>
</a>
{{/next_post}}
</div>
</nav>
</footer>
{{/is}}
</article>
</main>
{{/post}}