Add support for multiple images from Twitter links

- Fetch all images from Twitter syndication API (photos array)
- Store images with unified 'image' media type (first = thumbnail by ID order)
- Display multi-image tweets in grid layout on detail page
- Add hover cycling through images on home grid (2s interval)
- Show image count indicator on multi-image items
- Extract shared downloadAndStoreImages() helper for create/refresh
- Add migration to convert existing thumbnail/gallery types to image
- Make images clickable to open in new tab on detail page
This commit is contained in:
soup 2026-01-17 13:28:20 -05:00
parent e917e67930
commit 007e167707
Signed by: soup
SSH key fingerprint: SHA256:GYxje8eQkJ6HZKzVWDdyOUF1TyDiprruGhE0Ym8qYDY
9 changed files with 625 additions and 403 deletions

View file

@ -0,0 +1,8 @@
-- +goose Up
-- Consolidate 'thumbnail' and 'gallery' media types into unified 'image' type
UPDATE media SET media_type = 'image' WHERE media_type IN ('thumbnail', 'gallery');
-- +goose Down
-- Note: Cannot perfectly reverse since we lose the distinction between thumbnail and gallery
-- This sets all 'image' back to 'thumbnail' as a fallback
UPDATE media SET media_type = 'thumbnail' WHERE media_type = 'image';