erynwells.me/layouts/photos/single.html

44 lines
901 B
HTML
Raw Normal View History

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
{{ $photos := .Resources.ByType "image" }}
{{ 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 }}
{{ if eq (len $photos) 1 }}
2022-10-21 11:09:30 -07:00
{{- $img := index $photos 0 -}}
<figure><img src="{{ $img.RelPermalink }}"></figure>
2022-08-27 09:17:42 -07:00
2022-10-21 11:09:30 -07:00
{{ .Content }}
2022-08-27 09:17:42 -07:00
2022-10-21 11:09:30 -07:00
{{- partial "photo_exif_table.html" $img.Exif -}}
2022-08-27 09:17:42 -07:00
2022-10-21 11:09:30 -07:00
{{- if in ($.Site.BaseURL | string) "localhost" -}}
{{- partial "development/photo_exif_table.html" $img.Exif -}}
{{- end -}}
2022-08-27 09:17:42 -07:00
{{ else }}
2022-10-21 11:09:30 -07:00
<figure>
<ul class="carousel">
{{- range $photos -}}
<li>{{ . }}</li>
{{- end -}}
</ul>
</figure>
2022-08-27 09:17:42 -07:00
{{ end }}
<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 }}