Blog post and style tweaks
This commit is contained in:
parent
ff56875de9
commit
73b2473c24
14 changed files with 67 additions and 35 deletions
|
|
@ -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" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue