/
loop-grid.hbs
42 lines (39 loc) · 1.8 KB
/
loop-grid.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
<article class="gh-card {{post_class}}{{#match has_large_post "!=" false}}{{#has index="0"}} large{{/has}}{{/match}}">
<a class="gh-card-link" href="{{url}}">
{{#if feature_image}}
<figure class="gh-card-image">
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 720w,
{{img_url feature_image size="l"}} 960w,
{{img_url feature_image size="xl"}} 1200w,
{{img_url feature_image size="xxl"}} 2000w"
sizes="(max-width: 1200px) 100vw, 1200px"
src="{{img_url feature_image size="m"}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
>
</figure>
{{/if}}
<div class="gh-card-wrapper">
<header class="gh-card-header">
<h3 class="gh-card-title">{{title}}</h3>
</header>
{{#if excerpt}}
{{#is "home"}}
{{#has index="0"}}
<div class="gh-card-excerpt">{{excerpt}}</div>
{{/has}}
{{else}}
<div class="gh-card-excerpt">{{excerpt}}</div>
{{/is}}
{{/if}}
<footer class="gh-card-footer">
<span class="gh-card-author">{{#foreach authors}}{{#if @first}}{{name}}{{else}}, {{name}}{{/if}}{{/foreach}}</span>
<time class="gh-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
{{#if @site.comments_enabled}}
{{comment_count class="gh-card-comments"}}
{{/if}}
</footer>
</div>
</a>
</article>