-
Notifications
You must be signed in to change notification settings - Fork 1
/
tag.hbs
39 lines (35 loc) · 1.86 KB
/
tag.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
{{!< default}}
{{!-- The tag above means: insert everything in this file into the body of the default.hbs template --}}
<main class="gh-main gh-outer">
{{#tag}}
{{#if accent_color}}
<style>
:root {
--section-color: {{accent_color}};
}
</style>
{{/if}}
<section class="gh-archive gh-content{{#if feature_image}} has-image{{/if}}{{#if @custom.show_publication_info_sidebar}} has-sidebar{{/if}} gh-inner">
<div class="gh-archive-inner">
<header class="gh-archive-wrapper">
<h1 class="gh-article-title is-title">{{name}}</h1>
{{#if description}}{{{description}}}{{/if}}
<!-- Since the date the tag was created is unreliable,
instead get the oldest post with this tag. -->
{{#get "tags" filter="slug:~^'issue-'+slug:{{slug}}" limit="1" as |issue|}}
{{#issue}}
{{#get "posts" filter="tag:{{slug}}" order="published_at asc" limit="1" as |oldest_post|}}
{{#oldest_post}}
<em><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="Do MMMM YYYY"}}</time></em>
{{/oldest_post}}
{{/get}}
<div class="kg-card kg-button-card kg-align-left"><a href="/pdf/{{slug}}" class="kg-btn kg-btn-accent">Download issue PDF</a></div>
{{/issue}}
{{/get}}
</header>
{{> "feature-image"}}
</div>
</section>
{{/tag}}
{{> "components/post-list" feed="archive" postFeedStyle=@custom.post_feed_style showTitle=false showSidebar=@custom.show_publication_info_sidebar}}
</main>