forked from TryGhost/Casper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauthor.hbs
executable file
·92 lines (84 loc) · 3.15 KB
/
author.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
{{!< default}}
{{!-- Everything inside the #author tags pulls data from the author --}}
{{#author}}
<section class="author-header">
<div class="container wrapper">
<div class="grid">
<div class="col-xs-12">
<div class="author-profile center-xs">
{{!-- Author profile image --}}
{{#if cover_image}}
<div class="author-profile__cover lazyload" data-src="{{img_url cover_image}}"></div>
{{/if}}
{{!-- Author Name --}}
<h2 class="author-profile__name">{{name}}</h2>
{{!-- Author profile image --}}
{{#if profile_image}}
<div class="author-profile__image lazyload" data-src="{{img_url profile_image}}"></div>
{{/if}}
{{!-- Author bio --}}
{{#if bio}}
<div class="author-profile__description">{{bio}}</div>
{{/if}}
<div class="author-profile__meta">
{{!-- Author location --}}
{{#if location}}
<div class="author-profile__meta-location">
{{> icon name="map-pin" size="small"}}
<p>{{location}}</p>
</div>
{{/if}}
{{!-- Author post number --}}
<div class="author-profile__meta-count">
{{> icon name="bar-chart" size="small"}}
<p>
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}
</p>
</div>
</div>
{{!-- Author social links --}}
<div class="author-profile__social">
{{#if twitter}}
<a class="author-profile__social-link" href="{{twitter_url}}" target="_blank" title="Twitter" aria-label="Twitter">
{{> icon name="twitter" class="icon--filled"}}
</a>
{{/if}}
{{#if facebook}}
<a class="author-profile__social-link" href="{{facebook_url}}" target="_blank" title="Facebook" aria-label="Facebook">
{{> icon name="facebook" class="icon--filled"}}
</a>
{{/if}}
{{!-- Author website --}}
{{#if website}}
<a class="author-profile__social-link" href="{{website}}" target="_blank" title="Website" aria-label="Website">
{{> icon name="link"}}
</a>
{{/if}}
</div>
</div>
</div>
</div>
</div>
</section>
{{/author}}
{{!-- The main content/post by the author --}}
{{#if posts}}
<section class="author-posts" id="content">
<div class="container wrapper">
<div class="grid">
{{#foreach posts}}
<div class="col-xs-12 col-md-4 post-wrapper">
{{> post-card class="post-card--1-3"}}
</div>
{{/foreach}}
</div>
<div class="grid more-posts-wrapper">
</div>
<div class="grid">
<div class="col-xs-12 center-xs">
<button id="load-more-btn" class="btn btn__large btn__wide" onClick="loadMorePosts();">{{t "Load more posts"}}</button>
</div>
</div>
</div>
</section>
{{/if}}