-
Notifications
You must be signed in to change notification settings - Fork 0
/
amp-index.hbs
executable file
·60 lines (58 loc) · 2.19 KB
/
amp-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
{{> amp-head}}
{{#checkIf @config.custom.frontSource '==' "post" }}
{{> amp-frontpage-post}}
{{else}}
<main class="wrap-page">
{{#each posts}}
<article class="card">
{{#featuredImage}}
{{#if url}}
<a href="{{../url}}">
<amp-img
src="{{url}}"
alt="{{alt}}"
{{#if srcset.amp}}
srcset="{{srcset.amp}}"
{{else}}
{{#if srcset}}
srcset="{{srcset}}"
{{/if}}
{{/if}}
{{#if sizes.amp}}
sizes="{{sizes.amp}}"
{{else}}
{{#if sizes}}
sizes="{{sizes}}"
{{/if}}
{{/if}}
height="{{height}}"
layout="responsive"
width="{{width}}">
</amp-img>
</a>
{{/if}}
{{/featuredImage}}
<div class="card-text">
<h2>
<a href="{{url}}"> {{title}} </a>
</h2>
<p>{{{excerpt}}}</p>
<p class="card-meta">
{{#author}}
{{ translate 'post.publishedBy' }} <a href="{{url}}" rel="nofollow" title="{{name}}">{{name}}</a>
{{/author}}
<time datetime="{{date createdAt 'YYYY-MM-DDTHH:mm'}}">
{{#checkIf @config.custom.formatDate '!=' 'custom'}}
{{date createdAt @config.custom.formatDate}}
{{else}}
{{date createdAt @config.custom.formatDateCustom}}
{{/checkIf}}
</time>
</p>
</div>
</article>
{{/each}}
{{> amp-pagination}}
</main>
{{/checkIf}}
{{> amp-footer}}