blob: 4cdb6780a7d5e4899b1e626314deb06c884b61e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<a href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
{{ with .Resources.GetMatch "featuredImage" }}
<div class="card-img-container">
<picture>
{{ $thumbnail := .Resize "400x Lanczos" }}
{{ $thumbnail_2 := .Resize "800x Lanczos" }}
{{ $thumbnail_3 := .Resize "1200x Lanczos" }}
<source srcset="{{ $thumbnail.Permalink }} 1x, {{ $thumbnail_2.Permalink }} 2x, {{ $thumbnail_3.Permalink }} 3x">
<img src="{{ $thumbnail.Permalink }}" class="card-img" {{ with .Params.description -}} alt="{{ . }}" {{- end }}>
</picture>
</div>
{{- end }}
<article class="card-body">
<h2 class="card-title">{{ .Title | markdownify }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
{{ if (isset .Params "categories") }}<p>{{ range .Params.categories }}#{{ . | urlize | title }} {{ end }}</p>{{ end }}
</div>
</article>
</a>
|