-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
index.hbs
141 lines (122 loc) · 6.08 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
139
140
141
{{!< default}}
<main id="gh-main" class="gh-main gh-outer">
<div class="gh-inner">
{{^is "paged"}}
{{#foreach posts limit="1"}}
<article class="gh-latest gh-card {{post_class}}">
<a class="gh-card-link" href="{{url}}">
<header class="gh-card-header">
<div class="gh-article-meta">
<span class="gh-card-date">Latest — <time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time></span>
</div>
<h2 class="gh-article-title gh-card-title">{{title}}</h2>
</header>
<p class="gh-article-excerpt">{{excerpt}}</p>
<footer class="gh-card-meta">
<span class="gh-card-duration">{{reading_time}}</span>
{{#if @site.comments_enabled}}
{{comment_count class="gh-card-comments"}}
{{/if}}
{{^has visibility="public"}}
{{> icons/star}}
{{/has}}
</footer>
</a>
</article>
{{/foreach}}
{{/is}}
<div class="gh-wrapper">
<section class="gh-section">
<h2 class="gh-section-title">More issues</h2>
<div class="gh-feed">
{{^is "paged"}}
{{#foreach posts from="2"}}
{{> loop}}
{{/foreach}}
{{else}}
{{#foreach posts}}
{{> loop}}
{{/foreach}}
{{/is}}
</div>
{{#match posts.length "=" 1}}
Additional issues will be published soon.
{{/match}}
<button class="gh-loadmore gh-btn">Load more issues</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 members-only issues.</p>
<a class="gh-subscribe-input" href="#/portal/signup" data-portal="signup">
<div class="gh-subscribe-input-text">
{{> icons/email}}
</div>
<div class="gh-subscribe-input-btn">Subscribe</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">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 issues" singular="% issue" plural="% issues"}}
</span>
</a>
{{/foreach}}
</div>
</section>
{{/get}}
{{#if @site.recommendations_enabled}}
<section class="gh-section">
<h3 class="gh-section-title">Recommendations</h3>
<div class="gh-recommendations">
{{recommendations}}
<button data-portal="recommendations">See all {{> "icons/arrow-right"}}</button>
</div>
</section>
{{/if}}
</aside>
</div>
</div>
</main>