diff --git a/content/photos/photos.css b/content/photos/photos.css index 0cb7d73..37f2a25 100644 --- a/content/photos/photos.css +++ b/content/photos/photos.css @@ -1,44 +1,81 @@ :root { - --photo-params-background: #ddd; - --photo-params-border-color: #aaa; -} -@media (prefers-color-scheme: dark) { - :root { - --photo-params-background: #444; - --photo-params-background: #777; - } + --body-code-background-color: rgb(var(--dk-gray)); + --box-shadow-color: rgba(var(--dk-gray), 0.8); + + --heading-color: rgb(var(--white)); + + --html-color: rgb(var(--white)); + --html-background-color: rgb(var(--black)); + + --photo-params-background-color: rgb(var(--dk-gray)); + --photo-params-container-background-color: rgb(var(--sub-dk-gray)); + --photo-params-color: rgb(var(--super-lt-gray)); + --photo-params-border-color: rgb(var(--sub-dk-gray)); + + --platter-background-color: rgba(var(--black), var(--platter-background-opacity)); + + --separator-color: rgb(var(--dk-gray)); + + --twitter-icon: url(/icons/twitter-dark.svg); + --github-icon: url(/icons/github-dark.svg); + --instagram-icon: url(/icons/instagram-dark.svg); + --rss-icon: url(/icons/rss-dark.svg); } -ul.grid { - align-items: center; - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 5px; - justify-content: flex-start; +main.photos.list { + display: inline-block; + max-width: none; + margin: var(--body-item-spacing) 0; + padding: 0 var(--body-item-spacing); + width: 100%; +} + +main.photos.list ul.grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: 0.8rem; margin: 0; padding: 0; } - -.photos .grid li { - display: block; - height: 210px; - list-style: none; - width: 210px; +@media (max-width: 415px) { + .photos ul.grid { + grid-template-columns: repeat(2, 1fr); + } } -.grid li img { - border-radius: 0.5rem; +.photos .grid li { + line-height: 0; + list-style: none; +} + +.photos .grid li a { +} + +.photos .grid li img { + border-radius: 3px; } .photo-params { - background-color: var(--photo-params-background); + width: 100%; +} + +.photo-params .container { + display: block; + background-color: var(--photo-params-container-background-color); + border-radius: 10px; + margin: var(--body-item-spacing) auto; + padding: calc(var(--body-item-spacing) / 2); + width: 66%; +} + +.photo-params table { + background-color: var(--photo-params-background-color); + color: var(--photo-params-color); border-collapse: collapse; border-radius: 6px; - margin: 1rem auto; table-layout: fixed; text-align: center; - width: 66%; + width: 100%; } .photo-params thead td { @@ -84,7 +121,7 @@ ul.grid { .photo-params.debug thead { font-size: 2rem; font-weight: bold; - border-bottom: 2px solid var(--dark); + border-bottom: 2px solid rgb(var(--dk-gray)); } .photo-params.debug { diff --git a/layouts/partials/photo_exif_table.html b/layouts/partials/photo_exif_table.html index 5f8eb5b..37433d6 100644 --- a/layouts/partials/photo_exif_table.html +++ b/layouts/partials/photo_exif_table.html @@ -1,27 +1,31 @@ - - +
+
+
+ - - + + - - + + - -
{{ .Tags.Make }} {{ .Tags.Model }}
- {{ $lat := float .Lat }}{{ $latDir := cond (eq $lat 0) "" (cond (gt $lat 0) "N" "S") }} - {{ .Lat | lang.FormatNumber (cond (ne $lat 0) 3 0) }}º{{ $latDir }}, - {{ $long := float .Long }}{{ $longDir := cond (eq $long 0) "" (cond (gt $long 0) "E" "W") }} - {{ .Long | lang.FormatNumber (cond (ne $long 0) 3 0) }}º{{ $longDir }} + {{ $lat := float .Lat }}{{ $latDir := cond (eq $lat 0) "" (cond (gt $lat 0) "N" "S") }} + {{ .Lat | lang.FormatNumber (cond (ne $lat 0) 3 0) }}º{{ $latDir }}, + {{ $long := float .Long }}{{ $longDir := cond (eq $long 0) "" (cond (gt $long 0) "E" "W") }} + {{ .Long | lang.FormatNumber (cond (ne $long 0) 3 0) }}º{{ $longDir }} - {{ $widthpx := .Tags.PixelXDimension }} - {{ $heightpx := .Tags.PixelYDimension }} - {{ if and (gt $widthpx 0) (gt $heightpx 0) }} - {{ $megapixels := div (mul $widthpx $heightpx) 1e6 }} - {{ $megapixels | lang.FormatNumber 0 }} MP • {{ $widthpx }} × {{ $heightpx }} - {{ end }} + {{ $widthpx := .Tags.PixelXDimension }} + {{ $heightpx := .Tags.PixelYDimension }} + {{ if and (gt $widthpx 0) (gt $heightpx 0) }} + {{ $megapixels := div (mul $widthpx $heightpx) 1e6 }} + {{ $megapixels | lang.FormatNumber 0 }} MP • {{ $widthpx }} × {{ $heightpx }} + {{ end }}
{{ with .Tags.ISOSpeedRatings }}ISO {{ . }}{{ end }} {{ with .Tags.FocalLengthIn35mmFilm }}{{ . }} mm{{ end }} {{ with .Tags.FNumber }}ƒ{{ . }}{{ end }} {{ with .Tags.ExposureTime }}{{ . }} s{{ end }}
+ + + + diff --git a/layouts/photos/list.html b/layouts/photos/list.html index 5ef8c33..4382fd4 100644 --- a/layouts/photos/list.html +++ b/layouts/photos/list.html @@ -5,11 +5,9 @@ {{ define "main" }}
diff --git a/layouts/photos/single.html b/layouts/photos/single.html index d0e86f7..1aca09f 100644 --- a/layouts/photos/single.html +++ b/layouts/photos/single.html @@ -1,3 +1,7 @@ +{{ define "header" }} + {{ partial "header.html" . }} +{{ end }} + {{ define "main" }}
{{ if .Title }} -
- {{ partial "development/draft_tag.html" . }} -
-

{{ .Title }}

- -
-
+
+ {{ partial "development/draft_tag.html" . }} +
+

{{ .Title }}

+ +
+
{{ end }} {{ $photos := .Resources.ByType "image" }} @@ -21,26 +25,30 @@ {{ if eq (len $photos) 1 }} {{ $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" }} + {{ partial "footer.html" . }} +{{ end }}