-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
home.hbs
67 lines (62 loc) · 2.33 KB
/
home.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
{{!< default}}
<main class="gh-main gh-outer">
<div class="gh-inner">
<section class="gh-topic gh-topic-grid">
<h2 class="gh-topic-name">
{{#match pagination.pages ">" 1}}
<a href="{{@site.url}}/page/2">Latest</a>
{{else}}
Latest
{{/match}}
</h2>
<div class="gh-topic-content">
{{#foreach posts limit="7"}}
{{> "loop-grid"}}
{{/foreach}}
</div>
<footer class="gh-topic-footer">
{{#match pagination.pages ">" 1}}
<a class="gh-topic-link" href="{{@site.url}}/page/2">Show more {{> "icons/arrow"}}</a>
{{/match}}
</footer>
</section>
{{#if @custom.enter_tag_slugs_for_primary_sections}}
{{#get "tags" filter="slug:[{{@custom.enter_tag_slugs_for_primary_sections}}]"}}
{{#foreach tags}}
{{> "topic-grid"}}
{{/foreach}}
{{/get}}
{{else}}
{{#match posts.length ">" 1}}
{{#get "tags" include="count.posts" order="count.posts desc" limit="3"}}
{{#foreach tags}}
{{> "topic-grid"}}
{{/foreach}}
{{/get}}
{{/match}}
{{/if}}
{{#if @custom.enter_tag_slugs_for_secondary_sections}}
{{#get "tags" filter="slug:[{{@custom.enter_tag_slugs_for_secondary_sections}}]"}}
{{#if tags}}
<div class="gh-topic-list">
{{#foreach tags}}
{{> "topic-minimal"}}
{{/foreach}}
</div>
{{/if}}
{{/get}}
{{else}}
{{#match posts.length ">" 1}}
{{#get "tags" include="count.posts" order="count.posts desc"}}
{{#if tags.[3]}}
<div class="gh-topic-list">
{{#foreach tags from="4" limit="3"}}
{{> "topic-minimal"}}
{{/foreach}}
</div>
{{/if}}
{{/get}}
{{/match}}
{{/if}}
</div>
</main>