* refactor: simplify image partial logic, remove generation of different image sizes * Remove `defaultImage.opengraph` configuration from `params.toml`.
17 lines
648 B
HTML
17 lines
648 B
HTML
{{ $image := partial "helper/image" (dict "Image" .context.Params.image "Resources" .context.Resources) }}
|
|
<article class="{{ if $image }}has-image{{ end }}">
|
|
<a href="{{ .context.RelPermalink }}">
|
|
{{ if $image }}
|
|
<div class="article-image">
|
|
<img src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" loading="lazy"
|
|
alt="Featured image of post {{ .context.Title }}">
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="article-details">
|
|
<h2 class="article-title">
|
|
{{- .context.Title -}}
|
|
</h2>
|
|
</div>
|
|
</a>
|
|
</article> |