forked from TryGhost/Headline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.hbs
71 lines (63 loc) · 2.56 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
68
69
70
71
{{!< default}}
<main class="gh-main gh-outer">
<div class="kg-card kg-callout-card kg-callout-card-grey beta-box"><div class="kg-callout-emoji">🍄</div><div class="kg-callout-text m-auto"><a href=/regalar>We are in beta, you should expect bugs</a></div></div>
<divgh- class="gh-inner">
<section class="gh-topic gh-topic-grid">
<h2 class="gh-topic-name">
{{#match pagination.pages ">" 1}}
<a href="/blog">{{ t "Featured" }}</a>
{{else}}
{{t "Featured" }}
{{/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">+ {{name}} {{> "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>