Add banner image if available

This commit is contained in:
ekzyis 2024-04-13 13:46:47 +02:00
parent 4b4e1e04cf
commit 2e30077cb6
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@
<article class="box:border-box pt:32">
<header class="mb:32">
<div class="font:40 font:extrabold">{{ .Title }}</div>
{{- if isset .Params "banner" -}}
{{ $image := resources.Get .Params.banner }}
<img class="mt:16" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}">
{{- end -}}
<div class="mt:16 f:fade-60">
{{- if isset .Params "date" -}}
{{ if eq .Lastmod .Date }}