summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-30 22:20:53 +0300
committerPaul Buetow <paul@buetow.org>2026-05-30 22:20:53 +0300
commit0d2e1e6a510583734b75ef03f397b547dcd9568d (patch)
tree5dd2d4e5147b257f26aeeb290b4ca74429609221 /src
parentdbfab00f3bbb7c21a04ec5036cb35ff463837a5a (diff)
update photo album with enhanced CSS animations and fix imagemagick command order
Diffstat (limited to 'src')
-rwxr-xr-xsrc/photoalbum.sh17
1 files changed, 13 insertions, 4 deletions
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 < <(