Implement a photo carousel
The layout of this is all CSS with scroll-snap. (Neat!) Also implement a JavaScript scroll event listener that detects when photos scroll and updates the caption and photo data. Refactor a few parts of the photo_exif_table into partials so they can be reused for the carousel items.
This commit is contained in:
parent
c256179803
commit
81a5507e8f
7 changed files with 393 additions and 21 deletions
4
layouts/partials/photos/longitude.html
Normal file
4
layouts/partials/photos/longitude.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ $long := float .Long }}
|
||||
{{ $longDir := cond (eq $long 0) "" (cond (gt $long 0) "E" "W") }}
|
||||
{{ $formattedLong := printf "%sº%s" (.Long | lang.FormatNumber (cond (ne $long 0) 3 0)) $longDir }}
|
||||
{{ return $formattedLong }}
|
Loading…
Add table
Add a link
Reference in a new issue