forked from jckyeh/Callisto-Ghost-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.hbs
45 lines (39 loc) · 1.59 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
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
{{> header}}
<main class="main_minimal" role="main">
{{#foreach posts}}
<article class="card" role="article">
<div class="card__content">
<header>
<h2 class="card__title"><a href="{{url}}">{{title}}</a></h2>
</header>
<div class="card__desc">
<a href="{{url}}">{{excerpt words="33"}}
</a>
</div>
<time class="date" datetime="{{date format="YYYY-MM-DD"}}">{{date format='DD MMM YYYY'}}</time>
</div>
{{#if feature_image}}
<div class="card__img-wrapper">
<a href="{{url}}">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img class="card__img"
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 1000px) 400px, 700px"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
/>
</a>
</div>
{{/if}}
</article>
{{/foreach}}
</main>
{{pagination}}
{{> footer}}