forked from freeCodeCamp/news-theme-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtag.hbs
41 lines (36 loc) · 1.18 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
40
41
{{!< default}}
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
{{!--Special header.hbs partial to generate the <header> tag--}}
{{#tag}}
<div class="under-header-content">
<h1 class="site-title tags-title">#{{name}}</h1>
<h2 class="site-description">
{{#if description}}
{{description}}
{{else}}
A collection of {{plural ../pagination.total empty='posts' singular='% post' plural='% posts'}}
{{/if}}
</h2>
<div class="tags-row">
{{#get 'tags' limit='15' include='count.posts' order='count.posts desc'}}
{{#foreach tags}}
<a class='tag' href='{{ url }}'>
<h3>#{{ name }} <small> | {{ count.posts }}</small></h3>
</a>
{{/foreach}}
{{/get}}
</div>
</div>
</header>
{{/tag}}
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<div class="inner">
<div class="post-feed">
{{#foreach posts}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}}
{{/foreach}}
</div>
</div>
</main>