This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.hbs
68 lines (59 loc) · 1.91 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
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
{{#post}}
{{#if feature_image}}
<section class="featured">
<div class="image main"><img src="{{img_url feature_image}}" alt="{{title}}" /></div>
</section>
<section class="featured-content container">
{{^}}
<section class="no-featured container">
{{/if}}
<header class="main">
<span class="date">{{date format="MMMM D, YYYY"}}</span>
<h1>{{title}}</h1>
{{#if custom_excerpt}}
<p>{{custom_excerpt}}</p>
{{/if}}
</header>
<article>
{{content}}
</article>
<footer class="post-footer">
<div class="authors">
{{#foreach authors}}
<a class="author-box" href="{{url}}">
{{#if profile_image}}
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
{{/if}}
<section class="author-box-content">
<div class="author-box-label">Author</div>
<h5 class="author-box-name">{{name}}</h5>
{{#if bio}}
<p>{{bio}}</p>
{{else}}
<p>Read more posts by this author.</p>
{{/if}}
</section>
</a>
{{/foreach}}
</div>
</footer>
{{!--
<section class="post-full-comments">
If you want to embed comments, this is a good place to do it!
</section>
--}}
</section>
{{/post}}
<script>
var images = document.querySelectorAll('.kg-gallery-image img');
images.forEach(function (image) {
var container = image.closest('.kg-gallery-image');
var width = image.attributes.width.value;
var height = image.attributes.height.value;
var ratio = width / height;
container.style.flex = ratio + ' 1 0%';
})
</script>