forked from ScottSmith95/Decode-for-Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.hbs
63 lines (53 loc) · 1.93 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
{{!< default}}
{{! Everything inside the #post tags pulls data from the post }}
{{#post}}
<main class="site-content" role="main">
<article class="{{post_class}}">
{{! Add Open Graph tags to head}}
{{#contentFor "meta"}}
<meta property="og:description" content="{{excerpt characters="220"}}...">
{{/contentFor}}
{{! Everything below outputs content of the the post which has been published }}
<header class="post-header">
{{#if post.feature_image}}<a href="{{url}}"><img class="post-image" src="{{post.feature_image}}"></a>{{/if}}
<h1 class="post-title">{{title}}</h1>
<span class="post-meta">{{t "Posted on"}} <time datetime="{{date format="YYYY-MM-DD"}}">{{date format='DD MMMM YYYY'}}</time></span>
</header>
<section class="post-content">
{{content}}
</section>
<footer class="post-footer">
{{#primary_author}}
<section class="author-card cf">
{{#if profile_image}}
<figure class="author-image">
<a href="{{url}}"><img src="{{profile_image}}" alt="{{name}}'s Image"></a>
</figure>
{{/if}}
<div class="author-meta" {{#if profile_image}}style="width: 65%; float: left;"{{/if}}>
{{#if name}}<a class="author-name" href="{{url}}">{{name}}</a>{{/if}}
{{#if website}}<a href="{{website}}" class="author-website" rel="author">{{t "Website"}}</a>{{/if}}
{{#if location}}<div class="author-location">{{location}}</div>{{/if}}
{{#if bio}}<p class="author-bio">{{{bio}}}</p>{{/if}}
</div>
</section>
{{/primary_author}}
{{#if tags}}
<div class="post-tags">{{t "Tagged with"}}: {{tags separator=", "}}</div>
{{/if}}
</footer>
</article>
<aside class="post-navigation cf">
{{#next_post}}
<div class="nav-next">
<a href="{{url}}">{{title}}</a>
</div>
{{/next_post}}
{{#prev_post}}
<div class="nav-previous">
<a href="{{url}}">{{title}}</a>
</div>
{{/prev_post}}
</aside>
</main>
{{/post}}