Improve gallery video UX and add upload-to-publish media workflow.
Stage raw files in upload/, publish with make sync-media/publish, and polish the lightbox: autoplay, remembered volume, Escape to close, and image/video icons without poster or caption clutter. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
18
Makefile
18
Makefile
@@ -6,9 +6,9 @@ export GOMODCACHE ?= $(HOME)/go/pkg/mod
|
||||
export GOCACHE ?= $(HOME)/.cache/go-build
|
||||
|
||||
# One-off commands in the dev image (same caches and ./app mount as `make dev`)
|
||||
DEV_RUN := $(COMPOSE) run --rm --no-deps dev
|
||||
DEV_RUN := $(COMPOSE) run --rm --no-deps -T dev
|
||||
|
||||
.PHONY: dev build up down generate tidy logs
|
||||
.PHONY: dev build up down generate tidy logs thumbs sync-media publish convert-videos
|
||||
|
||||
.DEFAULT_GOAL := dev
|
||||
|
||||
@@ -34,3 +34,17 @@ tidy:
|
||||
|
||||
logs:
|
||||
$(COMPOSE) logs -f dev
|
||||
|
||||
# Pre-build gallery thumbnails and video poster JPEGs (ffmpeg in dev image).
|
||||
thumbs:
|
||||
$(DEV_RUN) go run ./cmd/server -thumbs
|
||||
|
||||
# Copy photos and convert videos from upload/ into app/images/.
|
||||
sync-media:
|
||||
$(DEV_RUN) sh -c 'UPLOAD_DIR=/upload IMAGES_DIR=/app/images ./scripts/sync-media.sh $(ARGS)'
|
||||
|
||||
# sync-media then rebuild thumbs/hero derivatives under app/images/.
|
||||
publish: sync-media thumbs
|
||||
|
||||
# Alias for sync-media (videos are converted as part of sync).
|
||||
convert-videos: sync-media
|
||||
|
||||
Reference in New Issue
Block a user