Skip to content

Commit

Permalink
fix: sorting by Date (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokaiser committed Aug 31, 2024
1 parent f856f41 commit db9376e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion layouts/partials/gallery.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<section class="gallery">
<div id="gallery" style="visibility: hidden; height: 1px; overflow: hidden">
{{ $images := slice }}
{{ range $image := .Resources.ByType "image" }}
{{ range $image := .Resources.ByType "image" }}
{{ $title := "" }}
{{ $date := "" }}
{{ with $image.Exif }}
{{ $date = .Date }}
{{ with .Tags.ImageDescription }}
{{/* Title from EXIF ImageDescription */}}
{{ $title = . }}
Expand All @@ -16,6 +18,7 @@
{{ $images = $images | append (dict
"Name" $image.Name
"Title" $title
"Date" $date
"image" $image
)
}}
Expand Down

0 comments on commit db9376e

Please sign in to comment.