forked from website/openpower.foundation
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
508 B
HTML
21 lines
508 B
HTML
{{ $src := .Get "src" }}
|
|
{{ $imagesrc := (printf "images/%s" $src) }}
|
|
{{ $width := .Get "width" }}
|
|
{{ $height := .Get "height" }}
|
|
{{ $imageresource := resources.Get $imagesrc }}
|
|
{{ if eq $width "" }}
|
|
{{ $width = "500" }}
|
|
{{ end }}
|
|
{{ if eq $height "" }}
|
|
{{ $height = "500" }}
|
|
{{ end }}
|
|
{{ $imageprocessing := (printf "%sx%s %s" $width $height "webp") }}
|
|
{{ $image := $imageresource.Fit $imageprocessing }}
|
|
<img src="{{ $image.RelPermalink }}">
|
|
{{ with .Get "caption" }}
|
|
<br>
|
|
<i>{{ . }}</i>
|
|
<br>
|
|
{{ end }}
|
|
|