Files
caldwell/layouts/_shortcodes/exif-image.html
2025-09-13 22:32:16 +00:00

26 lines
656 B
HTML

{{ $src := "" }}
{{ if .IsNamedParams }}
{{ $src = .Get "src" }}
{{ else }}
{{ $src = .Get 0 }}
{{ end }}
{{ $title := "" }}
{{ if .IsNamedParams }}
{{ $title = .Get "title" }}
{{ else }}
{{ $title = .Get 1 }}
{{ end }}
{{ $alt := "" }}
{{ if .IsNamedParams }}
{{ $alt = .Get "alt" }}
{{ else }}
{{ $alt = .Get 1 }}
{{ end }}
{{ $data := partial "components/image/process.html" (dict "page" .Page "src" $src) }}
{{ $caption := partial "components/image/exif.html" $data.original }}
{{ partial "components/image/index.html" (merge $data (dict "caption" $caption "title" $title "alt" $alt)) }}
{{- /* chomp trailing newline */ -}}