Skip to content

Commit 06f2d9c

Browse files
update the website layout and remove query.hbs file
1 parent a7c234d commit 06f2d9c

File tree

9 files changed

+189
-212
lines changed

9 files changed

+189
-212
lines changed

author.hbs

Lines changed: 56 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,76 @@
1+
2+
13
{{!< default}}
24

35
{{#author}}
46

5-
<!-- Author Section -->
6-
7+
{{!-- Author Section pass with block learn more about about block https://ghost.org/docs/themes/helpers/block/ --}}
78
{{#contentFor "authorName"}}
89
{{name}}
910
{{/contentFor}}
1011

11-
<div class="container m-auto mt-20 mb-16 flex flex-col xs:flex-col justify-evenly sm:flex-col md:flex-row lg:flex-row xg:flex-row 2xl:flex-row w-5/6 xs:w-5/6 sm:w-5/6 md:w-5/6 lg:w-5/6 xl:w-5/6 2xl:w-5/6">
12-
<div class="bg-cover h-64 w-64 rounded-full bg-center" style="background-image: url('{{profile_image}}')"></div>
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 my-auto ">
15-
16-
<h1 class=" text-gray-800 text-3xl mt-5 xs:text-3xl sm:text-3xl md:text-4xl xl:text-5xl 2xl:text-6xl"> {{name}} </h1>
17-
18-
<p class=" text-gray-600 text-xl mt-5 xs:text-xl sm:text-1xl md:text-2xl xl:text-3xl 2xl:text-3xl ">
19-
{{#if bio}}
20-
{{bio}}
21-
{{/if}}
22-
</p>
23-
24-
<ul class="flex flex-row mt-4">
25-
26-
<li class="text-md">{{location}}</li>
27-
28-
29-
<li class="mx-3"><a target="_blank" href="{{facebook}}">
12+
<div class="container mt-20 mb-16 flex flex-col justify-center mx-auto">
3013

31-
{{> Icons/facebook}}
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 ">
15+
16+
<h1 class="text-3xl mt-5 xs:text-3xl sm:text-3xl md:text-4xl xl:text-5xl 2xl:text-6xl"> {{name}} </h1>
3217

33-
</a></li>
34-
35-
<li class="mx-3"><a target="_blank" href="{{twitter}}">
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}}
3623

37-
{{> Icons/twitter}}
38-
</a></li>
39-
40-
<li class="mx-3"><a target="_blank" href="{{website}}">
24+
<ul class="flex flex-row my-3">
4125

42-
{{> Icons/website}}
43-
</a></li>
44-
45-
</ul>
26+
<li class="text-md">{{location}}</li>
4627

28+
{{#if facebook}}
29+
30+
<li class="mx-3 text-sm flex items-center">
31+
<a target="_blank" href="https://facebook.com/{{facebook}}" >
32+
33+
{{!-- Pass partials/Icons/facebook --}}
34+
{{> Icons/facebook}}
35+
36+
</a>
37+
</li>
38+
39+
{{/if}}
40+
{{#if twitter}}
41+
<li class="mx-3 text-sm flex items-center">
42+
<a target="_blank" href="https://twitter.com/{{twitter}}" >
43+
44+
{{!-- Pass partials/Icons/twitter --}}
45+
{{> Icons/twitter}}
46+
47+
</a>
48+
</li>
49+
{{/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}}
56+
57+
</a>
58+
</li>
59+
{{/if}}
60+
</ul>
4761
</div>
4862
</div>
4963

5064

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" }}
5167

68+
{{#if posts}}
69+
{{#foreach posts}}
70+
{{> postCard }}
71+
{{/foreach}}
72+
{{/if}}
5273

53-
{{#get "posts" limit="all" filter="authors:{{slug}}+id:-{{id}}" order="published_at desc" }}
54-
55-
{{#foreach posts}}
56-
{{> authorCard}}
57-
{{/foreach}}
58-
59-
60-
{{/get}}
74+
{{/get}}
6175

62-
{{/author}}
76+
{{/author}}

default.hbs

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,47 @@
11
<!DOCTYPE html>
2-
<html class="dark scroll-smooth overflow-x-hidden" lang="{{@site.locale}}">
32

4-
<head>
5-
6-
{{#is "index home"}}
7-
<link rel="icon" href="{{@site.icon}}" type="image/png">
8-
{{/is}}
9-
{{#is "post"}}
10-
{{{block "metaTags"}}}
11-
{{/is}}
3+
<html lang="{{@site.locale}}" class="dark scroll-smooth overflow-x-hidden">
124

5+
<head>
6+
137
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta charset="utf-8" />
9+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
10+
1411

15-
12+
{{!-- link production ready css file --}}
1613
<link rel="stylesheet" href="{{asset 'build/css/build.css'}}" />
17-
18-
<title>{{meta_title}}</title>
19-
20-
21-
22-
{{ghost_head}}
23-
14+
{{!-- <link rel="stylesheet" href="http://localhost:2368/ghost/assets/ghost-dark-e9195020925a360d83163e1e87b514a6.css" /> --}}
2415

2516

17+
{{!-- ghost header --}}
18+
{{ghost_head}}
2619

2720
</head>
2821

2922

30-
<body class=" {{body_class}} bg-white dark:bg-black dark:text-white antialiased scroll-smooth ">
23+
<body class="{{body_class}} bg-white dark:bg-black dark:text-white antialiased scroll-smooth ">
24+
25+
{{!-- partials/header --}}
3126
{{> header}}
3227

33-
<main class="mt-6 flex flex-col dark:bg-black dark:text-white">
28+
<main class="mt-6 flex flex-col">
3429

30+
{{!-- Render other pages --}}
3531
{{{body}}}
3632

3733
</main>
38-
34+
{{!-- partials/footer --}}
3935
{{> footer}}
40-
{{> banner}}
41-
4236

37+
{{!-- partials/banner --}}
38+
{{> banner}}
4339

40+
{{!-- ghost header --}}
4441
{{ghost_foot}}
45-
46-
<script src="{{asset 'build/js/search.js'}}"></script>
4742

48-
<script src="{{asset 'build/js/main.js'}}"></script>
43+
<script src="{{asset 'build/js/main.js'}}"></script>
44+
4945

5046

5147
</body>

error-404.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<a
1414
href="/"
15-
class="text-center w-32 h-7 m-auto my-20 p-3 bg-black text-white items-center rounded-full"
15+
class="text-center w-32 m-auto my-20 p-3 bg-black text-white items-center rounded-full"
1616
>
1717
Home
1818
</a>

error.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{message}}
1010
</p>
1111

12-
<a href="/" class="text-center w-32 h-7 m-auto my-20 p-3 bg-black text-white items-center rounded-full">
12+
<a href="/" class="text-center w-32 m-auto my-20 p-3 bg-black text-white items-center rounded-full">
1313
Home
1414
</a>
1515
</div>

index.hbs

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
{{!< default}}
1+
{{!-- Add default.hbs layout file --}}
2+
{{!< default}}
23

4+
{{!-- loop all the posts and show on home page --}}
35

4-
{{#foreach posts}}
6+
{{#foreach posts}}
57

6-
{{#has number="nth:3" }}
7-
{{#match @custom.adsense_enable "Enable"}}
8-
{{> ads}}
9-
{{/match}}
10-
{{/has}}
11-
12-
{{> postCard }}
13-
14-
{{/foreach}}
8+
{{!-- check condition define in config section in package.json and add adsense code after every third post --}}
9+
{{#has number="nth:3" }}
10+
{{#match @custom.adsense_enable "Enable" }}
11+
{{> ads}}
12+
{{/match}}
13+
{{/has}}
14+
15+
{{!-- partials/postCard.hbs --}}
16+
{{> postCard }}
1517

18+
{{/foreach}}
1619

20+
{{!-- Add pagination --}}
21+
{{pagination}}
1722

23+
{{!-- check condition define in config section in package.json and add adsense --}}
24+
{{#match @custom.adsense_enable "Enable"}}
25+
{{> ads}}
26+
{{/match}}
1827

19-
{{pagination}}
20-
21-
{{#match @custom.adsense_enable "Enable"}}
22-
{{> ads}}
23-
{{/match}}
24-
25-
{{> newsletter}}
28+
{{!-- newsletter partials --}}
29+
{{> newsletter}}

page.hbs

Lines changed: 37 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,58 @@
1-
{{!< default}}
1+
{{!< default}}
22

3-
{{#post}}
4-
{{#if feature_image}}
5-
{{#contentFor "metaTags"}}
6-
<link rel="icon" href="{{feature_image}}" type="image/png">
7-
{{/contentFor}}
8-
{{/if}}
9-
{{!--Pass reading_time time to authors partials --}}
10-
{{#contentFor "fastestReadingTime"}}
11-
12-
<p class="text-grey-600 text-xs xs:text-xs sm:text-xs md:text-sm lg:text-sm xl:text-sm 2xl:text-sm ">
13-
{{reading_time}}
14-
</p>
15-
{{/contentFor}}
16-
17-
{{#match @custom.adsense_enable "Disable"}}
3+
{{#post}}
184

19-
{{> ads}}
5+
{{!--Pass reading_time time to authors partials with block , learn more about about block https://ghost.org/docs/themes/helpers/block/ --}}
6+
{{#contentFor "fastestReadingTime"}}
207

21-
{{/match}}
22-
23-
<article class="text-black bg-white w-6/6 p-2">
24-
<!-- Heading section -->
25-
<div class=" m-auto mb-16 w-6/6 xs:w-5/6 sm:w-5/6 md:w-5/6 lg:w-5/6 xl:w-5/6 2xl:w-5/6">
26-
<h1 class="text-gray-800 mt-8 text-3xl xs:text-4xl sm:text-4xl md:text-5xl xl:text-6xl 2xl:text-8xl">
27-
{{title}}
28-
</h1>
29-
<p class="text-gray-600 text-xl xs:text-xl sm:text-xl md:text-1xl xl:text-2xl 2xl:text-2xl">
30-
{{excerpt}}
31-
</p>
32-
</div>
33-
<!-- Author card -->
34-
35-
{{> authors}}
8+
<p class="text-grey-600 text-xs xs:text-xs sm:text-xs md:text-sm lg:text-sm xl:text-sm 2xl:text-sm ">
9+
{{reading_time}}
10+
</p>
11+
{{/contentFor}}
3612

13+
{{!-- Add adsense base of if enable on theme --}}
14+
{{#match @custom.adsense_enable "Disable"}}
3715

38-
<!-- article thumnale -->
16+
{{> ads}}
3917

40-
{{> featureImage}}
18+
{{/match}}
4119

20+
<article class="{{post_class}} w-6/6 p-2">
4221

22+
<!-- Heading section -->
23+
<div class=" m-auto mb-16 w-6/6 xs:w-5/6 sm:w-5/6 md:w-5/6 lg:w-5/6 xl:w-5/6 2xl:w-5/6">
24+
<h1 class="text-gray-800 mt-8 text-3xl xs:text-4xl sm:text-4xl md:text-5xl xl:text-6xl 2xl:text-8xl">
25+
{{title}}
26+
</h1>
27+
<p class="text-gray-600 text-xl xs:text-xl sm:text-xl md:text-1xl xl:text-2xl 2xl:text-2xl">
28+
{{excerpt}}
29+
</p>
30+
</div>
31+
32+
<!-- partials/authors -->
33+
{{> authors}}
4334

44-
<!-- article body -->
45-
<div class=" articleBody m-auto p-2 my-10 w-10/12">
46-
{{content}}
47-
</div>
4835

36+
{{!-- partials/featureImage --}}
37+
{{> featureImage}}
4938

5039

51-
</article>
5240

53-
{{#match @custom.comment_enable_on_page "Enable"}}
54-
55-
{{> comment}}
41+
<!-- article body -->
42+
<div class=" prose-md prose-neutral m-auto p-2 my-10 w-10/12">
43+
{{content}}
44+
</div>
5645

57-
{{/match}}
5846

5947

60-
{{#match @custom.adsense_enable "Disable"}}
48+
</article>
6149

62-
{{> ads}}
6350

64-
{{/match}}
51+
{{!-- Add adsense --}}
52+
{{#match @custom.adsense_enable "Disable"}}
6553

54+
{{> ads}}
6655

56+
{{/match}}
6757

68-
{{/post}}
58+
{{/post}}

0 commit comments

Comments
 (0)