-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpost.hbs
138 lines (121 loc) · 5.64 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
{{!-- Include the header from partials/header.hbs --}}
{{> header}}
{{!-- Switch to the post context --}}
{{#post}}
{{!-- Show the post image if there is one --}}
<header class="cover" {{#if image}}style="background-image: url('{{img image}}');"{{/if}}>
<div class="content">
{{!-- The post title should have editable="true" here --}}
<h1 class="title">{{title editable="true"}}</h1>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-md-8 push-md-2 col-sm-10 push-sm-1 col-12">
{{!-- The `post_class` helper outputs useful classes for styling --}}
<article class="{{post_class}}">
<p class="description">
{{!-- Reading time --}}
<span class="reading-time">
{{reading_time}} min read
</span>
{{!-- Featured badge --}}
{{#if featured}}
<span class="featured">
Featured
</span>
{{/if}}
{{!-- Sticky badge --}}
{{#if sticky}}
<span class="sticky">
Sticky
</span>
{{/if}}
{{!-- Post date --}}
<span class="date">
{{date format="%B %e, %Y at %l:%M%P"}}
</span>
{{!-- Tags --}}
<span class="tags">
{{tags before="on " and=" and "}}
</span>
</p>
{{!-- The post content should have editable="true" here --}}
<div class="content">
{{content editable="true"}}
</div>
{{!-- Previous & next --}}
<div class="post-pagination">
{{!-- Previous --}}
{{#previous_post}}
<div class="previous">
<a href="{{post_url}}">Previous Post</a>
</div>
{{/previous_post}}
{{!-- Next --}}
{{#next_post}}
<div class="next">
<a class="btn btn-secondary" href="{{post_url}}">Next Post</a>
</div>
{{/next_post}}
</div>
</article>
</div>
</div>
<div class="col-md-8 push-md-2 col-sm-10 push-sm-1 col-12">
<div class="footer row">
{{!-- Author --}}
<div class="author col-md-8">
{{!-- Switch to the author context --}}
{{#author}}
{{!-- Avatar --}}
{{#if avatar}}
<a href="{{author_url}}">
<img class="author-avatar" src="{{img avatar}}" alt="{{name}}">
</a>
{{/if}}
{{!-- Name --}}
<h4 class="author-name">
<a href="{{author_url}}">{{name}}</a>
</h4>
{{!-- Bio --}}
<div class="author-bio">
{{bio}}
</div>
<div class="author-details">
{{!-- Location --}}
{{#if location}}
<span class="author-location">
<span class="icon icon-location"></span>
{{location}}
</span>
{{/if}}
{{!-- Website --}}
{{#if website}}
<span class="author-website">
<span class="icon icon-link"></span>
<a href="{{website}}">{{website}}</a>
</span>
{{/if}}
</div>
{{/author}}
</div>
{{!-- Sharing --}}
<div class="share col-md-4">
Share This Post<br>
<a class="share-icon icon icon-twitter" href="https://twitter.com/intent/tweet?text={{encode title}}&url={{encode (post_url)}}">
<span class="hidden">Share on Twitter</span>
</a>
<a class="share-icon icon icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{encode (post_url)}}">
<span class="hidden">Share on Facebook</span>
</a>
<a class="share-icon icon icon-googleplus" href="https://plus.google.com/share?url={{encode (post_url)}}">
<span class="hidden">Share on Google+</span>
</a>
</div>
</div>
</div>
</div>
{{/post}}
{{!-- Include the footer from partials/footer.hbs --}}
{{> footer}}