I'm still not happy with the circular image. It's not aligned like I would like.
13 lines
490 B
HTML
13 lines
490 B
HTML
{{- $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="img--circular{{ with $classes }} {{ . }}{{ end }}"
|
|
src="{{ $img.RelPermalink }}"
|
|
{{ with $alt }}alt="{{ . }}"{{ end }}
|
|
width="{{ $width }}"
|
|
height="{{ $width }}">
|