Blog post and style tweaks

This commit is contained in:
Dan 2026-02-19 09:49:00 +00:00
parent ff56875de9
commit 73b2473c24
14 changed files with 67 additions and 35 deletions

View file

@ -1,15 +1,15 @@
<!-- prettier-ignore -->
{{ $src := .src }}
{{ $alt := .alt | default "" }}
{{ $width := .width | default "800x" }}
{{ $width := or .width "800x800" }}
<figure class="blog-img-container">
{{ with .page.Resources.GetMatch $src }}
{{ $resized := .Resize $width }}
{{ $resized := .Fit $width }}
<img src="{{ $resized.RelPermalink }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
{{ else }}
{{ with resources.Get $src }}
{{ $resized := .Resize $width }}
{{ $resized := .Fit $width }}
<img src="{{ $resized.RelPermalink }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
{{ else }}
<img src="{{ $src }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />