thrrgilag.net/themes/binario/layouts/partials/post_thumbnail.html

13 lines
444 B
HTML
Raw Normal View History

2019-09-07 19:40:58 +00:00
{{- $img := (.page.Resources.ByType "image").GetMatch "thumbnail.*" }}
{{- $link := .link }}
{{- with $img }}
<figure class="post__thumbnail thumbnail">
{{- with $link }}
<a class="thumbnail__link" href="{{ . }}">
<img class="thumbnail__img" src="{{ $img.RelPermalink }}" alt="{{ $img.Title }}">
</a>
{{- else }}
<img class="thumbnail__img" src="{{ $img.RelPermalink }}" alt="{{ $img.Title }}">
{{- end }}
</figure>
{{- end }}