-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.hbs
48 lines (40 loc) · 1.51 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
{{!< default}}
{{#post}}
<div>
{{> post-header }}
<article>
<section class='content'>
{{ content }}
</section>
{{!-- Show the tags, author, subscribe box, and comments if visitor can access the post, this means that:
1. The post is public for anyone
2. The post is published for subscribers and the user is a subscriber
3. The post is for paid members only and the user is a paid member --}}
{{#if access}}
{{#if tags}}
<section class='tags'>
{{ tags separator='' }}
</section>
{{/if}}
{{#primary_author}}
{{> card-author }}
{{/primary_author}}
{{!-- If a user is not a member and he can accsess the post, that mean this post is published as public, in this case, we will show the subscribe form --}}
{{#unless @member}}
{{#if access}}
<section class='subscribe c-subscribe--center'>
<h3 class='u-type-500 u-mb-8'>{{t '{siteTitle} Newsletter' [email protected]}}</h3>
<p class='u-type-500 u-mb-16'>{{t 'Join the newsletter to receive the latest updates in your inbox.' }}</p>
{{> subscribe-form inputLabel='subscribe-email-post' formClass='subscribe-form--compact'}}
</section>
{{/if}}
{{/unless}}
{{!-- If the post is published for subscribers and paid members and the user is not one of those, show the upgrade box --}}
{{else}}
{{> post-upgrade-cta }}
{{/if}}
<hr>
</article>
</div>
{{/post}}
{{> related-posts}}