-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage-archives.hbs
More file actions
47 lines (45 loc) · 2 KB
/
page-archives.hbs
File metadata and controls
47 lines (45 loc) · 2 KB
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
{{!< default}}
{{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }}
{{#if @blog.navigation}}
{{navigation}}
{{/if}}
{{! Archives has the blog logo at the top, with a link back to the home page }}
<header class="post-header">
<a id="blog-logo" href="{{@blog.url}}">
{{#if @blog.logo}}
<img src="{{@blog.logo}}" alt="Blog Logo" />
{{else}}
{{@blog.title}}
{{/if}}
</a>
</header>
<main class="content" role="main">
<article class="archives">
<section class="archives-content">
<span class="archives-top"></span>
<span class="archives-total">
{{! count posts }}
{{#get "posts" as |posts postPages|}}
{{! Use our pages (pagination) object }}
<strong>
{{plural postPages.total empty=(t "No posts") singular=(t "A collection of 1 post") plural=(t "A collection of % posts")}}
</strong>
{{/get}}
</span>
{{#get "posts" limit="all" order="published_at desc"}}
{{#foreach posts}}
<div class='archives-item' date="{{date format='YYYY'}}" data-anijs="if: scroll, on: window, do: fadeInDown animated, before: scrollReveal">
<div class='archives-info'>
<div class="archives-info-meta">
<i class='fa fa-calendar fa-fw' aria-hidden='true'></i>
<time class="archives-date" datetime="{{date published_at format='MM-DD'}}">{{date published_at format="MM-DD"}}</time>
<a href='{{url}}'>{{title}}</a>
</div>
</div>
</div>
{{/foreach}}
{{/get}}
</section>
</article>
</main>