erynwells.me/layouts/partials/photo_exif_table.html

38 lines
1.5 KiB
HTML
Raw Normal View History

2022-10-19 07:38:26 -07:00
<div class="photo-params">
<div class="container">
<table>
{{ if and .Tags.Make .Tags.Model }}
2022-10-19 07:38:26 -07:00
<thead>
2022-08-27 09:17:42 -07:00
<td class="make-model" colspan=4>{{ .Tags.Make }} {{ .Tags.Model }}</td>
2022-10-19 07:38:26 -07:00
</thead>
{{ end }}
2022-10-19 07:38:26 -07:00
<tr>
{{ if and .Lat .Long }}
2022-08-27 09:17:42 -07:00
<td colspan="2" class="location">
<data class="latitude">{{ partial "photos/latitude.html" . }}</data>,
<data class="longitude">{{ partial "photos/longitude.html" . }}</data>
2022-08-27 09:17:42 -07:00
</td>
{{ end }}
{{ if and .Tags.PixelXDimension .Tags.PixelYDimension }}
2022-08-27 09:17:42 -07:00
<td colspan="2" class="size">
2022-10-19 07:38:26 -07:00
{{ $widthpx := .Tags.PixelXDimension }}
{{ $heightpx := .Tags.PixelYDimension }}
{{ if and (gt $widthpx 0) (gt $heightpx 0) }}
<data class="megapixels">{{ partial "photos/megapixels.html" .Tags }}</data><data class="width">{{
$widthpx }}</data> × <data class="height">{{ $heightpx }}</data>
2022-10-19 07:38:26 -07:00
{{ end }}
2022-08-27 09:17:42 -07:00
</td>
{{ end }}
2022-10-19 07:38:26 -07:00
</tr>
{{ if or .Tags.ISOSpeedRatings .Tags.FocalLengthIn35mmFilm .Tags.FNumber .Tags.ExposureTime }}
2022-10-19 07:38:26 -07:00
<tr class="exposure-attributes">
2022-08-27 09:17:42 -07:00
<td class="iso">{{ with .Tags.ISOSpeedRatings }}ISO {{ . }}{{ end }}</td>
<td class="focal-length">{{ with .Tags.FocalLengthIn35mmFilm }}{{ . }} mm{{ end }}</td>
<td class="f-number">{{ with .Tags.FNumber }}ƒ{{ . }}{{ end }}</td>
<td class="exposure-time">{{ with .Tags.ExposureTime }}{{ . }} s{{ end }}</td>
2022-10-19 07:38:26 -07:00
</tr>
{{ end }}
2022-10-19 07:38:26 -07:00
</table>
</div>
</div>