-
-
Notifications
You must be signed in to change notification settings - Fork 166
/
index.hbs
53 lines (46 loc) · 1.74 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
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
{{!-- Main --}}
<main id="main">
{{!-- Featured Post --}}
{{#is "home"}}
{{#get "posts" filter="featured:true" limit="1" as |featured_post|}}
{{#foreach featured_post}}
<article class="post featured">
<header class="major">
<span class="date">{{date format="MMM D, YYYY"}}</span>
<h2><a href="{{url}}">{{title}}</a></h2>
<p>{{excerpt words="44"}}</p>
</header>
{{#if feature_image}}
<a href="{{url}}" class="image main"><img src="{{img_url feature_image}}" alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}" /></a>
{{/if}}
<ul class="actions special">
<li><a href="{{url}}" class="button large">Full Story</a></li>
</ul>
</article>
{{/foreach}}
{{/get}}
{{/is}}
{{!-- Posts --}}
<section class="posts">
{{#foreach posts}}
<article>
<header>
<span class="date">{{date format="MMM D, YYYY"}}</span>
<h2><a href="{{url}}">{{title}}</a></h2>
</header>
{{#if feature_image}}
<a href="{{url}}" class="image fit"><img src="{{img_url feature_image}}" alt="{{title}}" /></a>
{{/if}}
<p>{{excerpt words="33"}}</p>
<ul class="actions special">
<li><a href="{{url}}" class="button">Full Story</a></li>
</ul>
</article>
{{/foreach}}
</section>
{{!-- Pagination --}}
{{pagination}}
</main>