From 0d2e1e6a510583734b75ef03f397b547dcd9568d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 30 May 2026 22:20:53 +0300 Subject: update photo album with enhanced CSS animations and fix imagemagick command order --- share/templates/default/header.tmpl | 48 ++++++++++++++++++++++++++++++++++++- src/photoalbum.sh | 17 +++++++++---- 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/share/templates/default/header.tmpl b/share/templates/default/header.tmpl index db6dd55..e74b4a2 100644 --- a/share/templates/default/header.tmpl +++ b/share/templates/default/header.tmpl @@ -49,8 +49,10 @@ cat < diff --git a/src/photoalbum.sh b/src/photoalbum.sh index bc721ee..4ade996 100755 --- a/src/photoalbum.sh +++ b/src/photoalbum.sh @@ -105,15 +105,15 @@ scalephotos() { if [ -n "${HEIGHT:-}" ]; then # Scale down size. imagemagick \ + "$INCOMING_DIR/$photo" \ -auto-orient \ -geometry "$HEIGHT" \ - "$INCOMING_DIR/$photo" \ "$destphoto_nospace" else # Keep original size. imagemagick \ - -auto-orient \ "$INCOMING_DIR/$photo" \ + -auto-orient \ "$destphoto_nospace" fi done < <( @@ -131,6 +131,15 @@ random_animation_css_class() { "animate-right-$speed" "animate-bottom-$speed" "animate-zoom-$speed" + "animate-snap-rotate-$speed" + "animate-hard-zoom-$speed" + "animate-slam-left-$speed" + "animate-slam-right-$speed" + "animate-flash-in-$speed" + "animate-invert-pop-$speed" + "animate-posterize-pop-$speed" + "animate-skew-snap-$speed" + "animate-glitch-step-$speed" ) printf '%s\n' "${classes[@]}" | sort -R | sed -n '1p' @@ -238,17 +247,17 @@ albumhtml() { # Double the height, as CSS scales images based on boxing too. height=$(( THUMBHEIGHT * 2 )) imagemagick \ - -geometry "x$height" \ "$DIST_DIR/$photos_dir/$photo" \ + -geometry "x$height" \ "$DIST_DIR/$thumbs_dir/$photo" dirname="$DIST_DIR/$blurs_dir" mkdir -p "$dirname" echo "Creating blur $DIST_DIR/$blurs_dir/$photo" imagemagick \ + "$DIST_DIR/$thumbs_dir/$photo" \ -flip \ -blur 0x8 \ - "$DIST_DIR/$thumbs_dir/$photo" \ "$DIST_DIR/$blurs_dir/$photo" fi done < <( -- cgit v1.2.3