Hugo-theme-stack/layouts/partials/article-list/tile.html

17 lines
611 B
HTML
Raw Normal View History

2020-08-22 07:20:08 -04:00
<article class="{{ if .context.Params.image }}has-image{{ end }}">
<a href="{{ .context.Permalink }}">
{{ if .context.Params.image }}
{{- $thumbnail := (partial "helper/image" (.context) ).Fill .size -}}
<div class="article-image">
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}"
loading="lazy">
</div>
{{ end }}
<div class="article-details">
<h2 class="article-title">
{{- .context.Title -}}
</h2>
</div>
</a>
</article>