This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.hbs
138 lines (117 loc) · 6.03 KB
/
index.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{{!< default}}
{{#if @custom.hero}}
<div class="kg-card kg-header-card kg-width-full {{@custom.hero_size}} {{@custom.hero_style}}" {{#if @custom.hero_image}}style="background-image: url({{@custom.hero_image}});" data-kg-background-image="{{@custom.hero_image}}"{{/if}} {{#if @custom.hero_color}}style="background: {{@custom.hero_color}};"{{/if}}>
{{#if @custom.hero_heading}}<h2 class="kg-header-card-header" id="heading-text">{{@custom.hero_heading}}</h2>{{/if}}
{{#if @custom.hero_subheading}}<h3 class="kg-header-card-subheader" id="subheading-text">{{@custom.hero_subheading}}</h3>{{/if}}
{{#if @custom.hero_cta_text}}<a href="{{@custom.hero_cta_url}}" class="kg-header-card-button">{{@custom.hero_cta_text}}</a>{{/if}}
</div>
{{/if}}
<main id="gh-main" class="gh-main gh-outer">
<div class="gh-inner">
{{^is "paged"}}
{{#foreach posts limit="1"}}
<article class="gh-latest {{post_class}}">
<header class="gh-card-header">
{{#if tags}}
{{#foreach tags autolink="true"}}
<a class="gh-card-tags" title="{{name}}" href="{{url}}">{{name}}</a>
{{/foreach}}
{{/if}}
<a class="gh-card-link" href="{{url}}">
<h2 class="gh-article-title gh-card-title">{{title}}
{{^has visibility="public"}}
{{> icons/star}}
{{/has}}
</h2>
<div class="gh-article-excerpt">{{excerpt}}</div>
</a>
</header>
</article>
{{/foreach}}
{{/is}}
<div class="gh-wrapper">
<section class="gh-section">
<h2 class="gh-section-title">SELECT * FROM content;</h2>
<div class="gh-feed">
{{^is "paged"}}
{{#foreach posts from="2"}}
{{> loop}}
{{/foreach}}
{{else}}
{{#foreach posts}}
{{> loop}}
{{/foreach}}
{{/is}}
</div>
{{#match posts.length "=" 1}}
More content will be published soon.
{{/match}}
<button class="gh-loadmore gh-btn">Load more content</button>
</section>
<aside class="gh-sidebar">
<section class="gh-section">
<h2 class="gh-section-title">About</h2>
<div class="gh-about">
{{#if @site.icon}}
<img class="gh-about-icon" src="{{@site.icon}}" alt="{{@site.title}}">
{{/if}}
<section class="gh-about-wrapper">
<h3 class="gh-about-title">{{@site.title}}</h3>
{{#if @site.description}}
<p class="gh-about-description">{{@site.description}}</p>
{{/if}}
</section>
</div>
{{#if @site.members_enabled}}
{{^if @member.paid}}
<div class="gh-signup">
{{^if @member}}
<p class="gh-signup-description">Sign up now to get access to the library of member-only content.</p>
<a class="gh-subscribe-input" href="#/portal/signup" data-portal="signup">
<div class="gh-subscribe-input-text">
{{> icons/email}}
email@example.com
</div>
<div class="gh-subscribe-input-btn">Get Started</div>
</a>
{{else}}
{{#if @setting.paid_members_enabled}}
<p class="gh-signup-description">Upgrade to a paid account to get full access.</p>
<a class="gh-signup-btn gh-btn gh-primary-btn" href="#/portal/account/plans" data-portal="account/plans">Upgrade now</a>
{{/if}}
{{/if}}
</div>
{{/if}}
{{/if}}
</section>
{{#get "posts" filter="featured:true" limit="all" as |featured|}}
{{#if featured}}
<section class="gh-section">
<h3 class="gh-section-title">SELECT * FROM Featured;</h3>
<div class="gh-featured gh-feed">
{{#foreach featured}}
{{> loop}}
{{/foreach}}
</div>
</section>
{{/if}}
{{/get}}
{{#get "tags" include="count.posts" limit="all" as |topic|}}
<section class="gh-section">
<h3 class="gh-section-title">Topics</h3>
<div class="gh-topic">
{{#foreach topic}}
<a class="gh-topic-item" href="{{url}}">
<h3 class="gh-topic-name">{{name}}</h3>
<span class="gh-topic-count">
{{plural count.posts empty="0 content" singular="% content" plural="% content"}}
</span>
</a>
{{/foreach}}
</div>
</section>
{{/get}}
</aside>
</div>
</div>
</main>