* refactor: simplify image partial logic, remove generation of different image sizes * Remove `defaultImage.opengraph` configuration from `params.toml`.
22 lines
824 B
HTML
22 lines
824 B
HTML
<article>
|
|
<a href="{{ .RelPermalink }}">
|
|
<div class="article-details">
|
|
<h2 class="article-title">
|
|
{{- .Title -}}
|
|
</h2>
|
|
<footer class="article-time">
|
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
|
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
|
</time>
|
|
</footer>
|
|
</div>
|
|
|
|
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
|
|
{{ if $image }}
|
|
<div class="article-image">
|
|
<img src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}"
|
|
loading="lazy">
|
|
</div>
|
|
{{ end }}
|
|
</a>
|
|
</article> |