hugo-theme-photostream/layouts/photos/single.html
Eryn Wells 63eb00bf4a Clean up the photo parameters table
Add a .no-value style to the items in the table. Streamline the logic for filling
in table values.
2024-11-04 08:36:57 -08:00

31 lines
968 B
HTML

{{ define "main" }}
<main class="main--single photostream--single">
<header class="page-header">
{{ partial "page_header.html" (dict "page" .) }}
</header>
{{- $images := partial "photostream/image-resources.html" . -}}
{{- if eq (len $images) 0 -}}
{{ errorf "Missing photo from photos page %q" .Path }}
{{- end -}}
{{ if eq (len $images) 1 }}
{{- $img := index $images 0 -}}
<figure class="figure figure--image photostream__figure">
<img
src="{{ $img.RelPermalink }}"
{{- with $img.Params.alt }} alt="{{ . }}" {{ end -}}>
</figure>
{{ .Content -}}
{{- if .Params.photoDetails | default .Params.photo_details | default true -}}
{{- partial "photostream/exif_table.html" $img.Exif -}}
{{- end -}}
{{ end }}{{/* if eq (len $images) 1 */}}
<footer class="page-footer">
{{ partial "page/footer.html" . }}
</footer>
</main>
{{ end }}