-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauthor.hbs
executable file
·113 lines (109 loc) · 4.09 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{{> head}}
{{> navbar}}
<main class="main">
<div class="main__left">
{{#author}}
{{#featuredImage}}
{{#if url}}
<figure class="hero">
<img
src="{{url}}"
{{#if @config.site.responsiveImages}}
{{responsiveImageAttributes 'authorImage' srcset sizes}}
{{/if}}
{{ lazyload "eager" }}
height="{{height}}"
width="{{width}}"
alt="{{alt}}">
{{#checkIfAny caption credits}}
<figcaption class="hero__caption">
{{caption}}
{{credits}}
</figcaption>
{{/checkIfAny}}
</figure>
{{else}}
{{#checkIfAll @config.custom.uploadHero @config.custom.displayHeroImage}}
<figure class="hero">
<img
src="{{@config.custom.uploadHero}}"
{{#if @config.site.responsiveImages}}
{{responsiveImageAttributes @config.custom.uploadHero}}
{{/if}}
{{ lazyload "eager" }}
{{imageDimensions @config.custom.uploadHero}}
alt="{{@config.custom.uploadHeroAlt}}">
{{#if @config.custom.uploadHeroCaption}}
<figcaption class="hero__caption">
{{@config.custom.uploadHeroCaption}}
</figcaption>
{{/if}}
</figure>
{{/checkIfAll}}
{{/if}}
{{/featuredImage}}
<header>
<div class="author__bio">
{{#if avatar}}
<img
src="{{avatarImage.url}}"
{{ lazyload "eager" }}
height="{{avatarImage.height}}"
width="{{avatarImage.width}}"
class="author__thumb"
alt="{{avatarImage.alt}}">
{{/if}}
<h1>{{name}}
<sup>({{postsNumber}})</sup>
</h1>
{{#if description}}
<p>
{{description}}
</p>
{{/if}}
{{#if website}}
<p class="author__website">
<svg height="24" width="24" stroke="currentColor" stroke-width="1" aria-hidden="true">
<use xlink:href="{{@website.assetsUrl}}/svg/svg-map.svg#website"/>
</svg>
<a href="{{website}}" target="_blank" rel="nofollow noreferrer noopener">{{ translate 'author.visitWebsite' }}</a>
</p>
{{/if}}
</div>
</header>
{{/author}}
</div>
<div class="main__right feed author">
<div>
{{#each posts}}
<article class="feed__item">
<header>
<h2>
<a href="{{url}}">
{{title}}
</a>
</h2>
{{#if @config.custom.listingDate}}
<div class="post__meta">
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
{{date createdAt @config.custom.formatDate}}
{{else}}
{{date createdAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
</div>
{{/if}}
</header>
{{#if hasCustomExcerpt}}
{{{ excerpt }}}
{{else}}
<p>{{{ excerpt }}}</p>
{{/if}}
</article>
{{/each}}
{{> pagination}}
</div>
</div>
</main>
{{> footer}}