-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.hbs
125 lines (107 loc) · 5.27 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
{{!< default}}
<main id="gh-main" class="gh-main gh-outer">
<div class="gh-inner">
{{^is "paged"}}
{{#get "posts" limit="1"}}
{{#foreach posts}}
<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-meta-wrapper">
<span class="gh-card-duration">{{reading_time}}</span>
{{^has visibility="public"}}
{{> icons/star}}
{{/has}}
</span>
</footer>
</a>
</article>
{{/foreach}}
{{/get}}
{{/is}}
<div class="gh-wrapper">
<section class="gh-section">
<h2 class="gh-section-title">More articles</h2>
<div class="gh-feed">
{{#foreach posts}}
{{^is "paged"}}
{{^has index="0"}}
{{> loop}}
{{/has}}
{{else}}
{{> loop}}
{{/is}}
{{/foreach}}
</div>
<button class="gh-loadmore gh-btn">Load more articles</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 @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 articles and content.</p>
<a class="gh-subscribe-input" href="#/portal/signup">
<div class="gh-subscribe-input-text">
{{> icons/email}}
</div>
<div class="gh-subscribe-input-btn">Subscribe</div>
</a>
{{else}}
<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">Upgrade now</a>
{{/if}}
</div>
{{/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 articles" singular="% article" plural="% articles"}}
</span>
</a>
{{/foreach}}
</div>
</section>
{{/get}}
</aside>
</div>
</div>
</main>