Skip to content

Commit 2321e8f

Browse files
rewrite ui
1 parent 8657072 commit 2321e8f

File tree

1 file changed

+50
-55
lines changed

1 file changed

+50
-55
lines changed

author.hbs

+50-55
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,71 @@
1-
2-
3-
{{!< default}}
4-
5-
{{#author}}
6-
7-
{{!-- Author Section pass with block learn more about about block https://ghost.org/docs/themes/helpers/block/ --}}
8-
{{#contentFor "authorName"}}
9-
{{name}}
10-
{{/contentFor}}
11-
12-
<div class="container mt-20 mb-16 flex flex-col justify-center mx-auto">
13-
14-
<div class="flex flex-col mt-6 w-6/6 xs:w-5/6 sm:w-5/6 md:w-3/6 lg:w-3/6 xl:w-3/6 2xl:w-3/6 xs:mt-6 sm:mt-6 md:mt-6 lg:mt-0 xl:mt-0 2xl:mt-0 ">
1+
{{!< default}} {{#author}} {{!-- Author Section pass with block learn more about about block
2+
https://ghost.org/docs/themes/helpers/block/ --}} {{#contentFor "authorName" }} {{name}} {{/contentFor}}
153

16-
<h1 class="text-3xl mt-5 xs:text-3xl sm:text-3xl md:text-4xl xl:text-5xl 2xl:text-6xl"> {{name}} </h1>
4+
<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 dark:bg-gray-800 dark:border-gray-700">
175

18-
{{#if bio}}
19-
<p class="mt-0 xs:mt-0 sm:mt-0 md:mt-1 lg:mt-3 xl:mt-3 2xl:mt-3 text-md">
20-
{{bio}}
21-
</p>
22-
{{/if}}
6+
<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">
7+
<img class="w-full object-cover rounded-full" src="{{profile_image}}" alt="{{#if name}} {{name}} {{else}} profile image {{/if}}">
8+
</div>
239

24-
<ul class="flex flex-row my-3">
10+
<div class="w-full p-6 my-3 md:my-0">
2511

26-
<li class="text-md">{{location}}</li>
12+
<h3 class="text-xl sm:text-2xl md:text-4xl font-bold text-gray-900 dark:text-white"> {{name}} </h3>
2713

28-
{{#if facebook}}
29-
30-
<li class="mx-3 text-sm flex items-center">
31-
<a target="_blank" href="https://facebook.com/{{facebook}}" >
14+
{{#if bio}}
15+
<p class="text-xl my-4 text-gray-500 dark:text-gray-400">{{bio}}</p>
16+
{{/if}}
3217

18+
<ul class="flex mx-auto flex-row md:justify-start justify-center">
19+
{{#if facebook}}
20+
<li class="mx-3 text-sm flex items-center">
21+
<a target="_blank" href="{{facebook_url}}"
22+
class="text-gray-700 hover:text-gray-900 dark:hover:text-white">
3323
{{!-- Pass partials/Icons/facebook --}}
34-
{{> Icons/facebook}}
35-
36-
</a>
37-
</li>
38-
24+
{{> Icons/facebook}}
25+
</a>
26+
</li>
3927
{{/if}}
40-
{{#if twitter}}
41-
<li class="mx-3 text-sm flex items-center">
42-
<a target="_blank" href="https://twitter.com/{{twitter}}" >
28+
29+
{{#if twitter}}
30+
<li class="mx-3 text-sm flex items-center">
31+
<a target="_blank" href="{{twitter_url}}"
32+
class="text-gray-700 hover:text-gray-900 dark:hover:text-white">
4333

4434
{{!-- Pass partials/Icons/twitter --}}
45-
{{> Icons/twitter}}
35+
{{> Icons/twitter}}
4636

47-
</a>
48-
</li>
37+
</a>
38+
</li>
4939
{{/if}}
50-
{{#if website}}
51-
<li class="mx-3 text-sm flex items-center">
52-
<a target="_blank" href="{{website}}" >
53-
54-
{{!-- Pass partials/Icons/website --}}
55-
{{> Icons/website}}
5640

57-
</a>
58-
</li>
41+
{{#if website}}
42+
<li class="mx-3 text-sm flex items-center">
43+
<a target="_blank" href="{{website}}" class="text-gray-700 hover:text-gray-900 dark:hover:text-white">
44+
{{!-- Pass partials/Icons/website --}}
45+
{{> Icons/website}}
46+
</a>
47+
</li>
5948
{{/if}}
60-
</ul>
49+
50+
</ul>
51+
52+
</div>
53+
6154
</div>
62-
</div>
6355

56+
<div class="container mx-auto my-12">
57+
<h1 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-white"> Published by {{name}}</h1>
58+
</div>
6459

65-
{{!-- get posts related to author base on author Id --}}
66-
{{#get "posts" limit="all" filter="authors:{{slug}}+id:-{{id}}" order="published_at desc" include="authors" }}
60+
{{!-- get posts related to author base on author Id --}}
61+
{{#get "posts" limit="all" filter="authors:{{slug}}+id:-{{id}}" order="published_at desc" include="authors" }}
6762

68-
{{#if posts}}
69-
{{#foreach posts}}
70-
{{> card }}
71-
{{/foreach}}
72-
{{/if}}
63+
{{#if posts}}
64+
{{#foreach posts}}
65+
{{> card }}
66+
{{/foreach}}
67+
{{/if}}
7368

7469
{{/get}}
7570

76-
{{/author}}
71+
{{/author}}

0 commit comments

Comments
 (0)