diff --git a/themes/nluug/layouts/partials/show-image.html b/themes/nluug/layouts/partials/show-image.html index f930fed..4a11566 100644 --- a/themes/nluug/layouts/partials/show-image.html +++ b/themes/nluug/layouts/partials/show-image.html @@ -1,33 +1,34 @@ +{{ if .link }}{{ end }}
- - {{ $isJPG := eq (path.Ext .image) ".jpg" }} - {{ $isPNG := eq (path.Ext .image) ".png" }} + + {{ $isJPG := eq (path.Ext .image) ".jpg" }} + {{ $isPNG := eq (path.Ext .image) ".png" }} - {{ if ($isJPG) -}} - {{ $webpPath:= replace .image ".jpg" ".webp" }} - {{ $webpPathStatic:= printf "static/%s" $webpPath }} + {{ if ($isJPG) -}} + {{ $webpPath:= replace .image ".jpg" ".webp" }} + {{ $webpPathStatic:= printf "static/%s" $webpPath }} - {{ if (fileExists $webpPathStatic) -}} - + {{ if (fileExists $webpPathStatic) -}} + + {{- end }} {{- end }} - {{- end }} - {{ if ($isPNG) -}} - {{ $webpPath:= replace .image ".png" ".webp" }} - {{ $webpPathStatic:= printf "static/%s" $webpPath }} + {{ if ($isPNG) -}} + {{ $webpPath:= replace .image ".png" ".webp" }} + {{ $webpPathStatic:= printf "static/%s" $webpPath }} - {{ if (fileExists $webpPathStatic) -}} - + {{ if (fileExists $webpPathStatic) -}} + + {{- end }} {{- end }} - {{- end }} - {{ $img := imageConfig (add "/static" (.image | safeURL)) }} - {{ if .link }}{{ end }} - {{ .alt }} - {{ if .link }}{{ end }} - -{{ if .figcaption }} -
-{{ .figcaption }} -
+ {{ $img := imageConfig (add "/static" (.image | safeURL)) }} + + {{ .alt }} + + {{ if .figcaption }} +
+ {{ .figcaption }} +
+ {{ end }}
-{{ end }} +{{ if .link }}{{ end }}