gallery/layouts/partials/albums/images.json

20 lines
626 B
JSON
Raw Permalink Normal View History

{{- $first := true -}}
{{- $filter := images.AutoOrient -}}
2024-10-24 11:07:53 +00:00
{{- $teaser := .Resources.GetMatch "thumbnail.jpg" -}}
{{- range .Resources.ByType "image" -}}
{{- 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 -}}
{{- end -}}
{{ end -}}