2024-10-17 08:34:18 -07:00
|
|
|
|
<div class="photo-params">
|
|
|
|
|
<table>
|
|
|
|
|
{{ if and .Tags.Make .Tags.Model }}
|
|
|
|
|
<thead>
|
|
|
|
|
<td class="make-model" colspan=4>
|
|
|
|
|
{{- $make := .Tags.Make -}}
|
|
|
|
|
{{- $model := .Tags.Model -}}
|
|
|
|
|
{{- if in $model $make -}}
|
|
|
|
|
{{ .Tags.Model }}
|
|
|
|
|
{{- else -}}
|
|
|
|
|
{{ .Tags.Make }} {{ .Tags.Model }}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
</td>
|
|
|
|
|
</thead>
|
|
|
|
|
{{ end }}
|
2024-11-04 08:36:57 -08:00
|
|
|
|
{{ with .Tags.LensModel -}}
|
|
|
|
|
<tr><td colspan="4" class="lens">{{ . }}</td></tr>
|
2024-10-17 08:34:18 -07:00
|
|
|
|
{{ end }}
|
|
|
|
|
<tr>
|
|
|
|
|
{{- $hasLocation := and .Lat .Long -}}
|
2024-11-04 08:36:57 -08:00
|
|
|
|
{{- $hasPixelDimensions := and .Tags.PixelXDimension .Tags.PixelYDimension -}}
|
2024-10-17 08:34:18 -07:00
|
|
|
|
{{ if $hasLocation -}}
|
2024-11-04 08:36:57 -08:00
|
|
|
|
<td
|
|
|
|
|
colspan="{{ cond $hasPixelDimensions 2 4 }}"
|
|
|
|
|
class="location">
|
|
|
|
|
{{ $latitude := float .Lat }}
|
|
|
|
|
{{ $latitudeDirection := cond (eq $latitude 0) "" (cond (gt $latitude 0) "N" "S") }}
|
|
|
|
|
<data class="latitude" value="{{ $latitude }}">
|
|
|
|
|
{{ $latitude | lang.FormatNumber (cond (ne $latitude 0) 3 0) }}º{{ $latitudeDirection }}
|
|
|
|
|
</data>,
|
|
|
|
|
{{ $longitude := float .Long }}
|
|
|
|
|
{{ $longitudeDirection := cond (eq $longitude 0) "" (cond (gt $longitude 0) "E" "W") }}
|
|
|
|
|
<data class="longitude" value="{{ $longitude }}">
|
|
|
|
|
{{ $longitude | lang.FormatNumber (cond (ne $longitude 0) 3 0) }}º{{ $longitudeDirection }}
|
|
|
|
|
</data>
|
|
|
|
|
</td>
|
2024-10-17 08:34:18 -07:00
|
|
|
|
{{- end -}}
|
2024-11-04 08:36:57 -08:00
|
|
|
|
{{ if $hasPixelDimensions -}}
|
|
|
|
|
<td colspan="{{ cond $hasLocation 2 4 }}" class="size">
|
2024-10-17 08:34:18 -07:00
|
|
|
|
{{- $widthpx := .Tags.PixelXDimension -}}
|
|
|
|
|
{{- $heightpx := .Tags.PixelYDimension -}}
|
|
|
|
|
{{- if and (gt $widthpx 0) (gt $heightpx 0) -}}
|
|
|
|
|
{{- $megapixels := div (mul $widthpx $heightpx) 1e6 -}}
|
|
|
|
|
<data class="megapixels nobreak" value="{{ $megapixels }}">{{ $megapixels | lang.FormatNumber 0 }} MP</data>
|
|
|
|
|
•
|
|
|
|
|
<span class="nobreak"><data class="width">{{ $widthpx }}</data> × <data class="height">{{ $heightpx }}</data></span>
|
|
|
|
|
{{- end -}}
|
|
|
|
|
</td>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</tr>
|
2024-11-04 08:36:57 -08:00
|
|
|
|
{{ if or
|
|
|
|
|
.Tags.ISOSpeedRatings
|
|
|
|
|
.Tags.FocalLengthIn35mmFilm
|
|
|
|
|
.Tags.FocalLength
|
|
|
|
|
.Tags.FNumber
|
|
|
|
|
.Tags.ExposureTime
|
|
|
|
|
}}
|
|
|
|
|
<tr class="exposure-attributes">
|
|
|
|
|
{{ with .Tags.ISOSpeedRatings -}}
|
|
|
|
|
<td class="iso">ISO {{ . }}</td>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<td class="iso no-value">--</td>
|
2024-10-17 08:34:18 -07:00
|
|
|
|
{{- end -}}
|
2024-11-04 08:36:57 -08:00
|
|
|
|
<td class="focal-length">
|
|
|
|
|
{{- with .Tags.FocalLengthIn35mmFilm | default .Tags.FocalLength -}}
|
|
|
|
|
{{ printf "%3.2f" (float .) }} mm
|
|
|
|
|
{{- end -}}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="f-number">
|
|
|
|
|
{{ with .Tags.FNumber }}{{ printf "ƒ%0.1f" (float .) }}{{ end }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="exposure-time">
|
|
|
|
|
{{- with $exposureTime := .Tags.ExposureTime -}}
|
|
|
|
|
{{- if in $exposureTime "/" -}}
|
|
|
|
|
{{ . }} s
|
|
|
|
|
{{- else -}}
|
|
|
|
|
1/{{ printf "%.0f" (div 1.0 (float $exposureTime)) }} s
|
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2024-10-17 08:34:18 -07:00
|
|
|
|
{{ end }}
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|