mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user