-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpost.hbs
101 lines (86 loc) · 4.21 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
{{!< default}}
{{!-- The tag above means: insert everything in this file into the body of the default.hbs template --}}
{{#post}}
<main class="gh-main">
<article class="gh-article {{post_class}}">
<header class="gh-article-header gh-canvas">
{{#if primary_tag}}
<a class="gh-article-tag" href="{{primary_tag.url}}">{{primary_tag.name}}</a>
{{/if}}
<h1 class="gh-article-title is-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="gh-article-excerpt is-body">{{custom_excerpt}}</p>
{{/if}}
<div class="gh-article-meta">
<div class="gh-article-author-image">
{{#foreach authors}}
{{#if profile_image}}
<a href="{{url}}">
<picture>
<source
srcset="{{img_url profile_image size="xs" format="avif"}} 1x,
{{img_url profile_image size="s" format="avif"}} 2x"
type="image/avif"
>
<!-- Serve the WebP format if the browser supports it -->
<source
srcset="{{img_url profile_image size="xs" format="webp"}} 1x,
{{img_url profile_image size="s" format="webp"}} 2x"
type="image/webp"
>
<!-- Serve original file format as a fallback -->
<img
class="author-profile-image"
srcset="{{img_url profile_image size="xs"}} 1x,
{{img_url profile_image size="s"}} 2x"
src="{{img_url profile_image size="xs"}}"
alt="{{name}}"
width="50px"
height="50px"
loading="eager"
>
</picture>
</a>
{{else}}
<a href="{{url}}">{{> "icons/avatar"}}</a>
{{/if}}
{{/foreach}}
</div>
<div class="gh-article-meta-wrapper">
<h2 class="gh-article-author-name">{{authors}}</h2>
<div class="gh-article-meta-content">
<time class="gh-article-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
{{#if reading_time}}
<span class="gh-article-meta-length"><span class="bull">—</span> {{reading_time minute=(t "A minute read") minutes=(t "% minutes read")}}</span>
{{/if}}
</div>
</div>
</div>
{{> "feature-image"}}
</header>
<section class="gh-content gh-canvas is-body">
{{content}}
</section>
<p class="print print-notice">{{t "Article printed at {date}. Please see {url} for the latest version." date=(date "") url=(url absolute="true")}}</p>
</article>
{{#if comments}}
<div class="gh-comments gh-canvas">
{{comments}}
</div>
{{/if}}
</main>
{{/post}}
{{#get "posts" include="authors" filter="id:-{{post.id}}+tag:-hash-termin+tag:-hash-pressemitteilung" limit="4" as |next|}}
{{#if next}}
<section class="gh-container is-grid gh-outer gh-recommended-posts">
<div class="gh-container-inner gh-inner">
<h2 class="gh-container-title">{{t "Read more"}}</h2>
<div class="gh-feed">
{{#foreach next}}
{{> "post-card" lazyLoad=true}}
{{/foreach}}
</div>
</div>
</section>
{{/if}}
{{/get}}