-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
author.hbs
70 lines (51 loc) · 2.36 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
{{!< default}}
{{#author}}
<div class="flex flex-col md:flex-row mx-1.5 md:mx-auto my-12 items-center md:w-[724px] rounded-lg shadow-md ">
<div class="p-2 w-4/6 sm:w-4/6 md:w-3/6 lg:w-2/6 sm:rounded-none sm:rounded-l-lg">
<img class="w-full object-cover rounded-full" src="{{profile_image}}" alt="{{#if name}} {{name}} {{else}} profile image {{/if}}">
</div>
<div class="w-full p-6 my-3 md:my-0">
<h2 style="color:{{@custom.icons_text_color}}" class="text-xl sm:text-2xl md:text-4xl font-bold"> {{name}} </h2>
{{#if bio}}
<p style="color:{{@custom.icons_text_color}}" class="text-xl my-4">{{bio}}</p>
{{/if}}
<ul class="flex mx-auto flex-row md:justify-start justify-center">
{{#if facebook}}
<li class="mx-3 text-sm flex items-center">
<a style="color:{{@custom.icons_text_color}}" target="_blank" href="{{facebook_url}}" >
{{!-- Pass partials/Icons/facebook --}}
{{> Icons/facebook}}
</a>
</li>
{{/if}}
{{#if twitter}}
<li class="mx-3 text-sm flex items-center">
<a style="color:{{@custom.icons_text_color}}" target="_blank" href="{{twitter_url}}">
{{!-- Pass partials/Icons/twitter --}}
{{> Icons/twitter}}
</a>
</li>
{{/if}}
{{#if website}}
<li class="mx-3 text-sm flex items-center">
<a style="color:{{@custom.icons_text_color}}" target="_blank" href="{{website}}">
{{!-- Pass partials/Icons/website --}}
{{> Icons/website}}
</a>
</li>
{{/if}}
</ul>
</div>
</div>
<div class="container mx-auto my-12">
<h1 class="text-3xl font-bold tracking-tight text-foreground"> Published by {{name}}</h1>
</div>
{{!-- get posts related to author base on author Id --}}
{{#get "posts" limit="all" filter="authors:{{slug}}+id:-{{id}}" order="published_at desc" include="authors" }}
{{#if posts}}
{{#foreach posts}}
{{> card }}
{{/foreach}}
{{/if}}
{{/get}}
{{/author}}