{{- /* File: resourcesproperties.html Description: Ausgabe von Resourceneigenschaften. Eine Resource kann sein: *.jpg, *.css, *pdf, usw. Parameter: Übergabe per Index Parameter 1: die Resource z.B. Blume.jpg Paramter 2: Schalter global requires: Parameter 1 returns: notice: example: {{}} {{}} */ -}} {{ if (index .Params 0) }} {{ $.Scratch.Set "param0" (index .Params 0) }} {{ else }} Keine Resource übergeben. {{ end }} {{ if (index .Params 1) }} {{ if eq (index .Params 1) "global" }} {{- /* Globale Resource angesprochen */ -}} {{ with resources.Get ($.Scratch.Get "param0") }} {{ $tmp := . }} {{ $.Scratch.Set "res" $tmp }} {{ end }} {{ end }} {{ else }} {{- /* Lokale Resource angesprochen */ -}} {{ $tmp := .Page.Parent.Resources.Get ($.Scratch.Get "param0") }} {{ $.Scratch.Set "res" $tmp }} {{ end }} {{ if (index .Params 1) }} {{ if eq (index .Params 1) "global" }} {{ end }} {{ else }} {{ end }} {{ if eq ($.Scratch.Get "res").ResourceType "image" }} {{ $image := ($.Scratch.Get "res" ) }} {{ with $image }} {{ with $image.Exif }} {{ with .Date }} {{- end -}} {{ with .Lat }} {{- end -}} {{ with .Long }} {{- end -}} {{ with .Tags.FNumber }} {{- end -}} {{ with .Tags.ApertureValue }} {{- end -}} {{ with .Tags.BrightnessValue }}{{- end -}} {{ with .Tags.ExposureTime }} {{- end -}} {{ with .Tags.FocalLength }} {{- end -}} {{ with .Tags.ISOSpeedRatings }}{{- end -}} {{ with .Tags.LensModel }} {{- end -}} {{ with .Tags.Make }} {{- end -}} {{ with .Tags.Model }} {{- end -}} {{ range $k, $v := .Tags }} {{ if ne $k "MakerNote" }} {{ end }} {{ end }} {{ end }} {{ end }} {{ else }} {{ end }}
Globale ResourceLokale ResourceErgebnis
{{- "{{" -}} . {{- "}}" -}} {{- ($.Scratch.Get "res") -}}
{{- "{{" -}} .ResourceType {{- "}}" -}} {{- ($.Scratch.Get "res").ResourceType -}}
{{- "{{" -}} .Name {{- "}}" -}} {{- ($.Scratch.Get "res").Name -}}
{{- "{{" -}} .Title {{- "}}" -}} {{- ($.Scratch.Get "res").Title -}}
{{- "{{" -}} .Permalink {{- "}}" -}} {{- ($.Scratch.Get "res").Permalink -}}
{{- "{{" -}} .RelPermalink {{- "}}" -}} {{- ($.Scratch.Get "res").RelPermalink -}}
{{- "{{" -}} .MediaType {{- "}}" -}} {{- ($.Scratch.Get "res").MediaType -}}
{{- "{{" -}} .MediaType.MainType {{- "}}" -}} {{- ($.Scratch.Get "res").MediaType.MainType -}}
{{- "{{" -}} .MediaType.SubType {{- "}}" -}} {{- ($.Scratch.Get "res").MediaType.SubType -}}
{{- "{{" -}} .MediaType.Suffixes {{- "}}" -}} {{- ($.Scratch.Get "res").MediaType.Suffixes -}}
  
Weitere Bilddaten
{{- "{{" -}} .Width {{- "}}" -}}{{- .Width -}}
{{- "{{" -}} .Height{{- "}}" -}}{{- .Height -}}
{{- "{{" -}} .Date {{- "}}" -}}{{- .Format "02 January 2006" -}}
{{- "{{" -}} .Lat {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Long {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.FNumber {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.ApertureValue {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.BrightnessValue {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.ExposureTime {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.FocalLength {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.ISOSpeedRatings {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.LensModel {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.Make {{- "}}" -}}{{- . -}}
{{- "{{" -}} .Tags.Model {{- "}}" -}}{{- . -}}
.Tags.{{ $k }}{{ $v }}
{{- "{{" -}} .ResourceType {{- "}}" -}} kein Image