feat(home): htmx lazy-load cover images

Replace the eager <img> on the home page with an htmx placeholder <figure>
that fetches a /cover-fragment endpoint when it scrolls into view
(hx-trigger="revealed"), so heavy cover bytes load only on demand.
Add spinner + settle-fade transition CSS, and load htmx.min.js on home.
This commit is contained in:
Pontoporeia
2026-09-18 16:26:36 +02:00
parent 541470b9bb
commit fc66b37801
9 changed files with 366 additions and 6 deletions
+10
View File
@@ -176,6 +176,16 @@ deploy-migrate:
ssh xamxam "cd /var/www/xamxam && REPO_ROOT=/var/www/xamxam bash /tmp/migrate.sh"
ssh xamxam "rm -f /tmp/migrate.sh"
[group('deploy')]
deploy-cover-webp dry_run='':
# Backfill small WebP cover thumbnails on the server (idempotent).
# Dry-run by default; pass --no-dry-run to actually generate. Runs as the
# SSH user (member of the xamxam group, dirs are setgid group-writable) so
# no sudo is needed. Deploy as www-data if group-write ever changes.
rsync -v scripts/generate-cover-webp.php xamxam:/tmp/generate-cover-webp.php
ssh xamxam "cd /var/www/xamxam && php /tmp/generate-cover-webp.php {{dry_run}}"
ssh xamxam "rm -f /tmp/generate-cover-webp.php"
[group('deploy')]
deploy-env:
#!/usr/bin/env bash