bunteshaus.de/themes/buha/layouts/shortcodes/picture.html
2022-04-05 20:58:02 +02:00

6 lines
269 B
HTML

{{ $nr := index .Params 0 }}
{{ $alt := "sry_no_desc" }}
{{ if index .Params 1}}{{ $alt = index .Params 1 }}{{ end }}
{{- $pic := index ($.Page.Resources.ByType "image") $nr -}}
<a href="{{- $pic.Permalink -}}"><img src="{{- $pic.Permalink -}}" alt="{{ $alt }}" /></a>