From e0fcfbaaa1791a36242aa89afcbb38d67192c813 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 21 Oct 2022 11:09:30 -0700 Subject: [PATCH] Bunch of misc photos template clean up --- layouts/photos/list.html | 14 ++++++------- layouts/photos/single.html | 41 ++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/layouts/photos/list.html b/layouts/photos/list.html index 44f04a2..ab950a0 100644 --- a/layouts/photos/list.html +++ b/layouts/photos/list.html @@ -5,14 +5,12 @@ {{ define "main" }} {{- $pages := (.Paginate (first 50 (.Pages.GroupByDate "January 2006"))).PageGroups -}} {{- range $pages -}} -
-
{{ .Key | title }}
- -
+
{{ .Key | title }}
+ {{- end -}} {{ end }} diff --git a/layouts/photos/single.html b/layouts/photos/single.html index 1aca09f..aecb644 100644 --- a/layouts/photos/single.html +++ b/layouts/photos/single.html @@ -3,16 +3,13 @@ {{ end }} {{ define "main" }} -
- + {{ if .Title }}
{{ partial "development/draft_tag.html" . }}
-

{{ .Title }}

+

{{ .Title }}

@@ -20,33 +17,29 @@ {{ $photos := .Resources.ByType "image" }} {{ if eq (len $photos) 0 }} -{{ errorf "Missing photo from photos page %q" .Path }} + {{ errorf "Missing photo from photos page %q" .Path }} {{ end }} {{ if eq (len $photos) 1 }} -{{ $img := index $photos 0 }} -
- -
+ {{- $img := index $photos 0 -}} +
-{{ .Content }} + {{ .Content }} -{{ partial "photo_exif_table.html" $img.Exif }} + {{- partial "photo_exif_table.html" $img.Exif -}} -{{ if in ($.Site.BaseURL | string) "localhost" }} -{{ partial "development/photo_exif_table.html" $img.Exif }} -{{ end }} + {{- if in ($.Site.BaseURL | string) "localhost" -}} + {{- partial "development/photo_exif_table.html" $img.Exif -}} + {{- end -}} {{ else }} -
- -
+
+ +
{{ end }} - -
{{ end }} {{ define "footer" }}