Add image uploads with a media library, and event card backgrounds
Uploads (migration 028, server/src/media.js, routes/media.js): editors and up upload JPEG, PNG, GIF, WebP or SVG. Photos are resized to 2400px and saved as WebP by default, or kept as uploaded on request. Files live in UPLOADS_DIR, served by nginx in production and by the API in dev. Admins and up delete, after seeing what still uses the file. Every image field in the editor is now an image widget: preview, the path as text, Upload and Choose from library. A new Media page lists the library. Org lists and event cards now resolve logos through media.ts, so uploaded paths work there. Events get a card_image (migration 029): a photo behind the card under a light veil so the text stays readable. The card's size is unchanged. Setup for production is in docs/media-uploads.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cd393e4ab2
commit
eaff23839f
26 changed files with 1234 additions and 22 deletions
|
|
@ -70,6 +70,13 @@ export const CMS_NAV = [
|
|||
label: "Front page",
|
||||
blurb: "The hero, its photos or livestream, and which bands the home page draws.",
|
||||
},
|
||||
// Not an entity: the uploaded-image library every image field
|
||||
// picks from. Its own page, AdminMedia.tsx.
|
||||
{
|
||||
to: "/admin/media",
|
||||
label: "Media",
|
||||
blurb: "Uploaded images: logos, photos and backgrounds, ready to reuse.",
|
||||
},
|
||||
];
|
||||
|
||||
/* Forms are submissions coming in rather than content going out, so
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue