Repository navigation
Expand file tree
/
Copy pathpost.hbs
More file actions
172 lines (153 loc) · 9.24 KB
/
Copy pathpost.hbs
File metadata and controls
172 lines (153 loc) · 9.24 KB
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{{!< default}}
{{#post}}
{{#if feature_image}}
{{#contentFor "head"}}
{{#match feature_image "~" "images.unsplash.com"}}
<link rel="preconnect" href="https://images.unsplash.com" crossorigin>
{{/match}}
<link rel="preload" as="image" fetchpriority="high"
href="{{img_url feature_image size="m" format="avif"}}"
imagesrcset="{{img_url feature_image size="s" format="avif"}} 320w, {{img_url feature_image size="m" format="avif"}} 600w"
imagesizes="(max-width: 640px) 100vw, 420px">
{{/contentFor}}
{{/if}}
<nav aria-label="Breadcrumb" class="px-6 sm:px-10 lg:px-20 pt-6 pb-2" style="color: var(--color-text-muted);">
<div class="mx-auto max-w-content flex flex-wrap items-center gap-2.5 font-sans text-[13px]">
<a href="{{@site.url}}" class="target-tap no-underline hover:underline" style="color: inherit;">{{t "Episodes"}}</a>
<span style="color: var(--color-border-strong);">/</span>
{{#primary_tag}}
<a href="{{url}}" class="target-tap no-underline hover:underline" style="color: inherit;">{{name}}</a>
<span style="color: var(--color-border-strong);">/</span>
{{/primary_tag}}
<span class="font-medium" style="color: var(--color-text);">{{title}}</span>
</div>
</nav>
<header data-pod-scope class="px-6 sm:px-10 lg:px-20 pt-8 pb-16 sm:pt-12 sm:pb-20" style="background-color: var(--color-bg);">
{{!-- data-pod-scope + the stash below confine applyPodMeta() hydration to this episode's cover + eyebrow. --}}
<script type="application/pod-meta" data-pod-meta>{{{codeinjection_foot}}}</script>
<div class="mx-auto max-w-content grid grid-cols-1 items-center gap-10 lg:grid-cols-[420px_minmax(0,1fr)] lg:gap-16">
{{> cover-art size_class="aspect-square w-full max-w-[420px] rounded-2xl mx-auto lg:mx-0" episode=primary_tag.name src=feature_image label=@site.title priority=true}}
<div class="flex flex-col gap-6">
<div class="eyebrow">
<span class="eyebrow-text">
<span data-pod-meta-eyebrow-bare></span><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="MMM D, YYYY"}}</time>
</span>
</div>
<h1 class="font-sans text-[36px] sm:text-[48px] lg:text-[60px] font-bold tracking-display leading-[1] m-0" style="color: var(--color-text);">{{title}}</h1>
{{#if custom_excerpt}}
<p class="font-serif text-[19px] sm:text-[22px] leading-[155%] m-0" style="color: var(--color-text-body);">{{custom_excerpt}}</p>
{{/if}}
{{!-- Reading time deliberately omitted — the audio player below shows
the actual episode duration. --}}
<ul class="flex flex-wrap items-center gap-x-4 gap-y-2 list-none p-0 m-0">
{{#if authors}}<li class="font-sans text-sm font-medium" style="color: var(--color-text-muted);">{{t "with"}} {{authors separator=", " lastSeparator=" & " autolink="false"}}</li>{{/if}}
<li><a href="#/share" class="target-tap font-sans text-sm font-medium underline" style="color: var(--color-accent-text);">{{t "Share"}}</a></li>
</ul>
{{> audio-player src=""}}
</div>
</div>
</header>
<div class="px-6 sm:px-10 lg:px-20 pt-12 pb-20">
<div class="mx-auto max-w-content grid grid-cols-1 gap-12 lg:grid-cols-[320px_minmax(0,1fr)] lg:gap-20">
<aside class="flex flex-col gap-8">
{{!-- Chapter list is rendered client-side from this stash to avoid nested {{#split}} on the codeinjection comments. --}}
{{#match codeinjection_foot "~" "<!-- pod:chapter="}}
<section data-pod-chapters>
{{> eyebrow text="CHAPTERS"}}
<ul class="card mt-3 list-none p-0 m-0" data-pod-chapter-list></ul>
<script type="application/pod-chapters" data-pod-chapter-data>{{{codeinjection_foot}}}</script>
</section>
{{/match}}
{{#if authors}}
<section class="card p-6">
{{> eyebrow text="WITH"}}
<ul class="mt-4 list-none p-0 space-y-6">
{{#foreach authors}}
<li>
<div class="flex items-center gap-3">
{{#if profile_image}}
<img src="{{img_url profile_image size="xs"}}" alt="{{name}}" class="h-14 w-14 rounded-full object-cover">
{{else}}
<span class="block h-14 w-14 rounded-full" style="background-image: linear-gradient(135deg, var(--color-accent-400) 0%, var(--color-accent-700) 100%);"></span>
{{/if}}
<div>
<p class="font-sans text-base font-semibold m-0" style="color: var(--color-text);">{{name}}</p>
{{#if location}}<p class="font-sans text-[12px] m-0" style="color: var(--color-text-muted);">{{location}}</p>{{/if}}
</div>
</div>
{{#if bio}}
<p class="mt-3 font-serif text-sm leading-[160%] m-0" style="color: var(--color-text-body);">{{bio}}</p>
{{/if}}
</li>
{{/foreach}}
</ul>
</section>
{{/if}}
</aside>
<article class="post-content post-content--beside-aside min-w-0">
{{content}}
{{#if @custom.show_post_cta}}
<div class="pod-cta mt-12 rounded-2xl px-8 py-10 sm:px-9 sm:py-11">
{{> eyebrow text="KEEP LISTENING"}}
<h3 class="pod-cta__heading mt-3 font-sans text-[24px] sm:text-[28px] font-bold tracking-title leading-tight m-0">
{{@custom.post_cta_heading}}
</h3>
<div class="mt-5 flex flex-wrap items-center gap-2 sm:gap-3">
{{> subscribe-pills surface="dark"}}
</div>
</div>
{{/if}}
{{#match @site.comments_enabled "!=" "off"}}
<section class="mt-12">
{{comments mode="auto" title="Discussion"}}
</section>
{{/match}}
</article>
</div>
</div>
{{#get "posts" filter="tag:hash-podcast+id:-{{id}}" limit="3" order="published_at desc" as |related|}}
{{#if related}}
<section class="px-6 sm:px-10 lg:px-20 py-20" style="background-color: var(--color-surface-alt);">
<div class="mx-auto max-w-content">
{{> eyebrow text="RELATED"}}
<h2 class="mt-3 mb-10 font-sans text-[32px] sm:text-[36px] font-bold tracking-title m-0" style="color: var(--color-text);">{{t "If you liked this, try these."}}</h2>
<div class="grid grid-cols-1 gap-6 md:grid-cols-3">
{{#foreach related}}
<article class="card p-6 flex flex-col gap-5">
{{!-- Per-card pod:* markers hydrate the cover fallback tile
(see assets/js/player.js). Same pattern as post-card. --}}
<script type="application/pod-meta" data-pod-meta>{{{codeinjection_foot}}}</script>
{{> cover-art size_class="h-20 w-20 rounded-lg" episode=primary_tag.name src=feature_image hide_label=true hide_meta=true}}
{{#if primary_tag}}<p class="font-mono text-[11px] uppercase m-0" style="letter-spacing: 0.08em; color: var(--color-accent-text);">{{primary_tag.name}}</p>{{/if}}
<h3 class="font-sans text-[19px] font-semibold tracking-tight leading-tight m-0" style="color: var(--color-text);">
<a href="{{url}}" class="target-tap no-underline" style="color: inherit;">{{title}}</a>
</h3>
<p class="font-mono text-[12px] m-0" style="color: var(--color-text-muted);">{{> pod-duration}}</p>
</article>
{{/foreach}}
</div>
</div>
</section>
{{/if}}
{{/get}}
<nav aria-label="Episode navigation" class="px-6 sm:px-10 lg:px-20 py-12 sm:py-16" style="background-color: var(--color-bg);">
<div class="mx-auto max-w-content grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-8">
{{#prev_post}}
<a href="{{url}}" class="card no-underline flex flex-col gap-2 p-6 group" style="color: var(--color-text);">
<span class="font-mono text-[11px] uppercase" style="letter-spacing: 0.1em; color: var(--color-text-muted);">{{t "← Previous episode"}}</span>
<span class="font-sans text-[18px] font-semibold tracking-tight leading-tight">{{title}}</span>
</a>
{{else}}
<span></span>
{{/prev_post}}
{{#next_post}}
<a href="{{url}}" class="card no-underline flex flex-col gap-2 p-6 sm:items-end sm:text-right group" style="color: var(--color-text);">
<span class="font-mono text-[11px] uppercase" style="letter-spacing: 0.1em; color: var(--color-text-muted);">{{t "Next episode →"}}</span>
<span class="font-sans text-[18px] font-semibold tracking-tight leading-tight">{{title}}</span>
</a>
{{else}}
<span></span>
{{/next_post}}
</div>
</nav>
{{/post}}