-
Notifications
You must be signed in to change notification settings - Fork 9
/
post.hbs
86 lines (74 loc) · 2.31 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
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
{{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}}
<div class="post {{post_class}}">
<article>
<div class="post__header section-padding--double">
<div class="grid-small">
<h2>{{title}}</h2>
<time class="post__date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time>
</div>
</div>
{{#if feature_image}}
<div class="post__img">
<div>
<figure class="absolute-bg" style="background-image: url('{{feature_image}}');"></figure>
</div>
</div>
{{/if}}
<div class="post__content section-padding">
<div class="grid">
{{content}}
{{> share}}
</div>
</div>
{{!-- Everything inside the #author tags pulls data from the author --}}
{{#author}}
<div class="section-padding--none">
<div class="grid">
<hr class="sep"/>
</div>
</div>
<div class="section-padding">
<div class="grid-small">
<span class="post__author">Posted by <a href="{{url}}" title="More By {{name}}">{{name}}</a></span>
{{#if bio}}
<p class="post__bio">{{bio}}</p>
{{/if}}
</div>
</div>
{{/author}}
{{> disqus}}
</article>
</div>
{{!-- Links to Previous/Next posts --}}
{{#if primary_tag}}
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3"}}
{{#if posts}}
<section class="related section-padding">
<div class="grid-xlarge">
<h2 class="related__title">Related</h2>
<div class="related__container">
{{#foreach posts}}
<article class="related__post">
<a class="related__link" href="{{url}}">
{{#if feature_image}}
<figure class="related__img">
<img src="{{feature_image}}" alt="{{title}}"/>
</figure>
{{/if}}
<div>
<h2 class="related__text">{{title}}</h2>
</div>
</a>
</article>
{{/foreach}}
</div>
</div>
</section>
{{/if}}
{{/get}}
{{/if}}
{{/post}}