-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.hbs
73 lines (65 loc) · 2.61 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
{{!< default}}
<main id="content" class="content post-content" role="main">
{{! Everything inside the #post tags pulls data from the post }}
{{#post}}
<article class="post {{post_class}}">
<div class="post-header">
<h1 class="post-title">{{title}}</h1>
<section class="post-meta">
# <time class="post-date" datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time> {{tags prefix=" on "}}
</section>
</div>
<section class="post-content">
{{#if image}}
<p><img src="{{image}}" alt="Post image"/></p>
{{/if}}
{{content}}
</section>
<section class="post-share">
<h4>gem share <span class="share-title">{{title}}</span>.gem</h4>
<div class="social">
<a class="icon-twitter" href="https://twitter.com/intent/tweet?text={{encode title}}&url={{url absolute="true"}}"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<span class="hidden">Facebook</span>
</a>
<a class="icon-googleplus" href="https://plus.google.com/share?url={{url absolute="true"}}"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<span class="hidden">Google+</span>
</a>
</div>
</section>
<div class="post-footer">
{{! Everything inside the #author tags pulls data from the author }}
{{#author}}
<section class="post-author">
<p class="comment"># puts "This was an article of <a href="{{url}}">{{name}}</a>"</p>
</section>
{{/author}}
<p class="comment"># next</p>
<section class="post-other-articles clearfix">
{{#next_post}}
<div class="post-other">
<h2><a href="{{url}}">{{title}}</a> <time datetime="{{date format='YYYY-MM-DD'}}"><b>#</b> next</h2>
</div>
{{/next_post}}
{{#prev_post}}
<div class="post-other">
<h2><a href="{{url}}">{{title}}</a> <time datetime="{{date format='YYYY-MM-DD'}}"><b>#</b> previous</h2>
</div>
{{/prev_post}}
</section>
</div>
</article>
{{/post}}
</main>
<script type="text/javascript">
// Update the name of the "gem" :P
$(document).ready(function(){
var share = $('.share-title');
share.text(share.text().toLowerCase().replace(/\s/g, '_'));
});
</script>