feat: update blog pages

This commit is contained in:
Henk Verlinde
2022-06-27 14:41:00 +02:00
parent 9f2a3fbbc5
commit 59a3f00529
15 changed files with 154 additions and 66 deletions

View File

@ -0,0 +1,14 @@
{{ $fillImage := .Scratch.Get "fillImage" }}
{{ if not $fillImage -}}
{{ $fillImage = site.Params.fillImage }}
{{ end -}}
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
{{ if not $image -}}
{{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
{{ end -}}
{{ $image = $image.Fill $fillImage }}
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
<img class="card-img-top img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">