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:
parent
e917e67930
commit
007e167707
9 changed files with 625 additions and 403 deletions
8
internal/migrations/sql/0004_unify_image_media_type.sql
Normal file
8
internal/migrations/sql/0004_unify_image_media_type.sql
Normal 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';
|
||||
Loading…
Add table
Add a link
Reference in a new issue