-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpost.hbs
71 lines (44 loc) · 2.54 KB
/
post.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
{{!< default}}
{{#post}}
<article class="{{post_class}} pt-8 pb-16 lg:pt-16 lg:pb-24 antialiased flex flex-col justify-between px-4 mx-auto max-w-screen">
<section class="mx-auto text-center w-full max-w-4xl prose-neutral prose-sm prose-ul:list-disc prose-ol:list-disc sm:prose-base lg:prose-lg format-blue dark:format-invert">
<time class="w-full text-slate-600 dark:text-slate-400 font-extrabold text-xs xs:text-xs sm:text-xs md:text-sm lg:text-sm xl:text-sm 2xl:text-sm " datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time>
<h1 class="mb-4 text-3xl font-extrabold text-center leading-tight text-gray-900 lg:mb-6 lg:text-6xl dark:text-white"> {{title}} </h1>
<p class="text-slate-600 dark:text-slate-400 text-xs xs:text-xs sm:text-xs md:text-sm lg:text-2xl ">{{excerpt}}</p>
<header class="mb-4 lg:mb-6 not-prose mx-auto">
<address class="flex items-center justify-center mb-6 not-italic">
<div class="inline-flex items-center mr-3 text-sm text-gray-900 dark:text-white">
<img class="mr-4 w-16 h-16 rounded-full" src="{{primary_author.profile_image}}" alt="{{primary_author.name}}">
<div>
<a href="{{primary_author.url}}" rel="author" class="text-xl font-bold text-gray-900 dark:text-white">{{primary_author.name}}</a>
</div>
</div>
</address>
</header>
<div class="my-5">
{{#foreach tags visibility="public"}}
<a href="{{url}}" class="bg-purple-100 text-purple-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-gray-700 dark:text-purple-400 border border-purple-400" > # {{name}}</a>
{{/foreach}}
</div>
</section>
{{> featureImage}}
<section class="mx-auto w-full max-w-4xl prose-neutral prose-sm prose-ul:list-disc prose-ol:list-disc sm:prose-base lg:prose-lg format-blue dark:format-invert">
{{content}}
</section>
</article>
{{!-- partials/comment --}}
{{> comment}}
{{!-- Show related posts --}}
{{#get "posts" filter="authors:{{primary_author.slug}}+id:-{{id}}" limit="3" include="authors"}}
{{!-- if posts is available then show it --}}
{{#if posts}}
<h2 class="mt-10 m-auto text-left w-5/6 text-xl xs:text-1xl sm:text-3xl md:text-4xl xl:text-5xl 2xl:text-6xl">
Read more
</h2>
{{!-- loop all post --}}
{{#foreach posts}}
{{> card }}
{{/foreach}}
{{/if}}
{{/get}}
{{/post}}