Move circular_image back to the top level

This commit is contained in:
Eryn Wells 2024-10-07 21:43:47 -07:00
parent 47d1bf9ffe
commit 0f200e3d09

View file

@ -0,0 +1,12 @@
{{- $img := (.Page.Resources.GetMatch (.Get "name")) -}}
{{- $id := .Get "id" -}}
{{- $classes := .Get "class" -}}
{{- $alt := .Get "alt" | default $img.Params.alt -}}
{{- $width := .Get "width" -}}
{{- $resized_img := $img.Resize (printf "%dx%d" $width $width) -}}
<img
{{ with $id }}id="{{ . }}"{{ end }}
class="circular{{ with $classes }} {{ . }}{{ end }}"
src="{{ $img.RelPermalink }}"
{{ with $alt }}alt="{{ . }}"{{ end }}
width="{{ $width }}" height="{{ $width }}">