-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtag.hbs
91 lines (77 loc) · 2.78 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
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
{{!< default}}
<main class="site__content background-alternate">
<section
class="section section--only-top print-padding-none"
aria-labelledby="h__header"
>
<div class="container">
{{#tag}}
<div class="article">
<div class="article__meta">Téma</div>
<h1 id="h__header" class="article__title">{{name}}</h1>
{{#if description}}
<p class="article__summary spacing-bottom-none js-nbsp">
{{description}}
</p>
{{/if}}
</div>
{{/tag}}
</div>
</section>
{{!
Manually get **all** glossary items with current tag because they would be paginated as part
of `posts`.
}}
{{#get "posts"
filter="primary_tag:slovnik+tag:{{tag.slug}}"
limit="all"
as |glossary_items|
}}
{{#if glossary_items}}
<section
id="slovnik"
class="section section--only-top"
aria-labelledby="h__slovnik"
>
<div class="container">
<h2 id="h__slovnik" class="spacing-bottom-small">Hesla ve slovníku</h2>
<ul class="list-unstyled list-inline spacing-bottom-none">
{{#foreach glossary_items visibility="public"}}
<li class="list-item-decorated">
<a href="{{url}}" class="text-nowrap">{{title}}</a>
</li>
{{/foreach}}
</ul>
</div>
</section>
{{/if}}
{{/get}}
{{!
Use `posts` as the source for **paginated** listing of posts with the "Články" tag (output
of `get` helper cannot be paginated.) The tradeoff is that `<section>` is always present in
the markup, even when there are no relevant articles.
}}
<section
id="clanky"
class="section"
aria-labelledby="h__clanky"
>
<div class="container container--dense">
{{!
Hide the headline as we cannot be sure if there are some posts or not.
(It's visually redundant anyway.)
}}
<h2 id="h__clanky" class="visually-hidden">Články</h2>
<div class="post-feed">
{{#foreach posts visibility="public"}}
{{#has tag="Články"}}
<div class="post-feed__item">
{{> "post-card" headingLevel=3}}
</div>
{{/has}}
{{/foreach}}
</div>
</div>
</section>
</main>
{{> "footer"}}