2022-10-19 07:38:26 -07:00
|
|
|
{{ define "header" }}
|
|
|
|
{{ partial "header.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
|
2022-08-27 09:17:42 -07:00
|
|
|
{{ define "main" }}
|
2022-10-31 08:41:24 -07:00
|
|
|
{{- if .Title -}}
|
|
|
|
{{ partial "content_header.html" . }}
|
|
|
|
{{- end -}}
|
2022-08-27 09:17:42 -07:00
|
|
|
|
2022-11-29 09:06:18 -08:00
|
|
|
{{- $photos := partial "photos/list.html" . -}}
|
2022-08-27 09:17:42 -07:00
|
|
|
{{ if eq (len $photos) 0 }}
|
2022-10-21 11:09:30 -07:00
|
|
|
{{ errorf "Missing photo from photos page %q" .Path }}
|
2022-08-27 09:17:42 -07:00
|
|
|
{{ end }}
|
|
|
|
|
2023-04-02 09:56:27 -07:00
|
|
|
{{- $firstImage := index $photos 0 -}}
|
2022-08-27 09:17:42 -07:00
|
|
|
{{ if eq (len $photos) 1 }}
|
2022-10-21 11:09:30 -07:00
|
|
|
<figure>
|
2023-04-02 09:56:27 -07:00
|
|
|
<img src="{{ $firstImage.RelPermalink }}"{{ with $firstImage.Params.alt }} alt="{{ . }}"{{ end }}>
|
|
|
|
</figure>
|
|
|
|
{{ else }}
|
|
|
|
<figure class="carousel">
|
|
|
|
<div class="shadow left"></div>
|
|
|
|
<div class="shadow right"></div>
|
|
|
|
<ul>
|
2022-10-21 11:09:30 -07:00
|
|
|
{{- range $photos -}}
|
2023-04-02 09:56:27 -07:00
|
|
|
<li data-title="{{ .Title }}"
|
|
|
|
{{- with .Exif -}}
|
|
|
|
data-latitude="{{ partial "photos/latitude.html" . }}"
|
|
|
|
data-longitude="{{ partial "photos/longitude.html" . }}"
|
|
|
|
{{- with .Tags -}}
|
|
|
|
data-make="{{ .Make }}"
|
|
|
|
data-model="{{ .Model }}"
|
|
|
|
data-iso="{{ .ISOSpeedRatings }}"
|
|
|
|
data-focal-length="{{ .FocalLengthIn35mmFilm }}"
|
|
|
|
data-f-number="{{ .FNumber }}"
|
|
|
|
data-exposure-time="{{ .ExposureTime }}"
|
|
|
|
data-megapixels="{{ partial "photos/megapixels.html" . }}"
|
|
|
|
data-width="{{ .PixelXDimension }}"
|
|
|
|
data-height="{{ .PixelYDimension }}"
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
>
|
|
|
|
<img src="{{ .RelPermalink }}"{{ with .Params.alt }} alt="{{ . }}"{{ end }}>
|
|
|
|
</li>
|
2022-10-21 11:09:30 -07:00
|
|
|
{{- end -}}
|
|
|
|
</ul>
|
2023-04-02 09:56:27 -07:00
|
|
|
<figcaption>
|
|
|
|
{{ $firstImage.Title }}
|
|
|
|
</figcaption>
|
2022-10-21 11:09:30 -07:00
|
|
|
</figure>
|
2022-08-27 09:17:42 -07:00
|
|
|
{{ end }}
|
2022-10-31 08:40:17 -07:00
|
|
|
|
2023-04-02 09:56:27 -07:00
|
|
|
<section id="content">
|
|
|
|
{{ .Content }}
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{{- if .Params.photo_details | default true -}}
|
|
|
|
{{- partial "photo_exif_table.html" $firstImage.Exif -}}
|
|
|
|
|
|
|
|
{{- if in ($.Site.BaseURL | string) "localhost" -}}
|
|
|
|
{{- partial "development/photo_exif_table.html" $firstImage.Exif -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
2022-10-31 08:40:17 -07:00
|
|
|
<footer>
|
|
|
|
{{ partial "footer_tags.html" . }}
|
|
|
|
</footer>
|
2022-08-27 09:17:42 -07:00
|
|
|
{{ end }}
|
2022-10-19 07:38:26 -07:00
|
|
|
|
|
|
|
{{ define "footer" }}
|
|
|
|
{{ partial "footer.html" . }}
|
|
|
|
{{ end }}
|
2023-04-02 09:56:27 -07:00
|
|
|
|
|
|
|
{{ define "scripts" }}
|
|
|
|
{{- $photos := partial "photos/list.html" . -}}
|
2023-04-05 08:14:19 -07:00
|
|
|
{{ if gt (len $photos) 1 -}}
|
2023-04-05 08:13:27 -07:00
|
|
|
{{- with resources.Get "scripts/photos/carousel.js" | fingerprint "md5" -}}
|
2023-04-05 08:14:19 -07:00
|
|
|
<script type="module" src="{{ .RelPermalink }}"></script>
|
2023-04-05 08:13:27 -07:00
|
|
|
{{- end -}}
|
2023-04-05 08:14:19 -07:00
|
|
|
{{- end }}
|
2023-04-02 09:56:27 -07:00
|
|
|
{{ end }}
|