2024-10-21 17:03:23 +00:00
|
|
|
{{- $first := true -}}
|
2024-10-24 10:00:02 +00:00
|
|
|
{{- $filter := images.AutoOrient -}}
|
|
|
|
{{- $teaser := "" -}}
|
|
|
|
{{- with .Params.teaserImage -}}
|
|
|
|
{{- $teaser = $.Resources.GetMatch . -}}
|
|
|
|
{{- end -}}
|
2024-10-21 17:03:23 +00:00
|
|
|
{{- range .Resources.ByType "image" -}}
|
2024-10-24 10:00:02 +00:00
|
|
|
{{- if not (eq $teaser .) -}}
|
|
|
|
{{- if not $first }}, {{ end }}
|
|
|
|
{{ $first = false -}}
|
|
|
|
{{- with . | images.Filter $filter -}}
|
|
|
|
{
|
|
|
|
"title": "{{ .Title }}",
|
|
|
|
"url": "{{ .RelPermalink }}",
|
|
|
|
"width": "{{ .Width }}",
|
|
|
|
"height": "{{ .Height }}",
|
|
|
|
"thumbnail": "{{ (.Fit "300x200").RelPermalink }}"
|
|
|
|
}
|
|
|
|
{{- end -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{ warnf "Skipping teaser image" }}
|
|
|
|
{{- end -}}
|
|
|
|
|
2024-10-21 17:03:23 +00:00
|
|
|
{{ end -}}
|