-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
post.hbs
158 lines (140 loc) · 5.53 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{{!< default}}
{{#contentFor 'styles'}}
<link rel="prefetch" href="https://mindsers.blog/">
<link rel="prerender" href="https://mindsers.blog/">
<link rel='stylesheet' type='text/css' href='{{asset 'css/post.css'}}' />
{{/contentFor}}
{{#contentFor 'title'}}{{meta_title}} - {{@site.title}}{{/contentFor}}
{{#post}}
{{#has tag="#lang-fr"}}
{{#contentFor 'htmlLang'}}fr{{/contentFor}}
{{#contentFor 'meta'}}
<link rel="alternate" hreflang="fr"
href="{{#if canonical_url}}{{canonical_url}}{{else}}{{url absolute="true"}}{{/if}}" />
{{/contentFor}}
{{else}}
{{#contentFor 'htmlLang'}}en{{/contentFor}}
{{#contentFor 'meta'}}
<link rel="alternate" hreflang="x-default"
href="{{#if canonical_url}}{{canonical_url}}{{else}}{{url absolute="true"}}{{/if}}" />
<link rel="alternate" hreflang="en"
href="{{#if canonical_url}}{{canonical_url}}{{else}}{{url absolute="true"}}{{/if}}" />
{{/contentFor}}
{{/has}}
<article class="mds-article {{post_class}}">
<header class="mds-header mds-canvas {{^if feature_image}}no-image{{/if}}">
{{#if feature_image}}
<div class="featured">
<img class="mds-feature-image" srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w" sizes="(max-width: 1000px) 1000px, 2000px"
loading="lazy" src="{{img_url feature_image size="xl"}}" alt="{{title}}" />
</div>
{{/if}}
<div class="summary">
<h1 class="mds-title" {{#has tag="#lang-fr"}}lang="fr" {{/has}}>{{title}}</h1>
{{#if custom_excerpt}}
<p class="mds-excerpt" {{#has tag="#lang-fr"}}lang="fr" {{/has}}>{{custom_excerpt}}</p>
{{/if}}
<p class="mds-post-meta">
<time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time>
<span class="bull">•</span> {{reading_time}}
</p>
</div>
</header>
<div class="mds-share">
<a class="button rounded primary" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
target="_blank" rel="nofollow noreferrer">
{{> "icons/facebook"}}
</a>
<a class="button rounded primary"
href="https://twitter.com/intent/tweet?url={{url absolute="true"}}&text={{title}}" target="_blank"
rel="nofollow noreferrer">
{{> "icons/twitter"}}
</a>
<a class="button rounded primary"
href="https://www.linkedin.com/shareArticle?mini=true&url={{url absolute="true"}}" target="_blank"
rel="nofollow noreferrer">
{{> "icons/linkedin"}}
</a>
</div>
<div class="mds-content mds-canvas" {{#has tag="#lang-fr"}}lang="fr" {{/has}}>
{{#has visibility='public'}}
{{> "thanks-cta"}}
{{else}}
{{#has tag='#additional-content'}}
{{> "thanks-cta"}}
{{/has}}
{{/has}}
{{content}}
{{#if access}}
{{#unless @member}}
{{> "notification-cta"}}
{{/unless}}
{{#has tag="#lang-fr"}}
<p class="mds-auto-content">
Si vous avez des questions ou des remarques/conseils,
n'hésitez pas à laisser un commentaire plus bas ! Je serais ravis de vous lire.
Et si vous aimez l'article, n'oubliez pas de le partager avec vos amis.
</p>
{{else}}
<p class="mds-auto-content">
If you have any questions or advices, please create a comment below!
I'll be really glad to read you.
Also if you like this post, don't forget to share it with your friends.
It helps a lot!
</p>
{{/has}}
{{/if}}
</div>
<footer class="mds-footer mds-canvas">
<hr />
<div class="mds-post-authors">
Written by {{#foreach authors}}<a href="{{url}}">{{name}}</a>{{/foreach}}<br />
{{^has tag="#issue"}}Published in {{tags separator=", "}}{{/has}}
</div>
<hr>
{{#if comments}}
<section class="mds-comments">
<header>
<h2>Discussions</h2>
<div class="mds-comments-info">
<div>
N'oublie pas de lire les <a href="/community-guidelines/">Community Guidelines</a> avant de commenter.
</div>
<div>
{{comment_count}}
</div>
</div>
</header>
<div class="mds-comments-container">
{{comments title="" count=false mode="auto" saturation=80}}
</div>
</section>
{{/if}}
</footer>
</article>
<aside class="mds-readmore">
<div class="mds-readmore-inner mds-container">
<div class="mds-readmore-next">
{{#next_post}}
<a class="pagination-link" href="{{url}}">
‹ <h4>{{title}}</h4>
</a>
{{/next_post}}
</div>
<div class="mds-readmore-prev">
{{#prev_post}}
<a class="pagination-link" href="{{url}}">
<h4>{{title}}</h4> ›
</a>
{{/prev_post}}
</div>
</div>
</aside>
{{/post}}
{{#contentFor "scripts"}}
<script src="https://unpkg.com/shiki" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="module" src="{{asset 'js/post.js'}}"></script>
{{/contentFor}}