Add Picture Grid layout type for custom sections#61
Merged
vincentmakes merged 1 commit intomainfrom Mar 4, 2026
Merged
Conversation
New custom section layout that displays uploaded pictures in a responsive 3-column grid. Pictures center automatically when fewer than 3 are present. Features: - File upload with JPEG/PNG/WebP support (max 5MB) - Optional captions per picture - Automatic file cleanup on item/section deletion - Thumbnail previews in admin item list - Responsive: 2 columns on mobile, 3 on desktop - Full i18n support across all 8 languages Bump version to 1.14.0. https://claude.ai/code/session_01AD2TdNL3RDp5ynSrJr2tpN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a new "Picture Grid" layout type for custom sections, allowing users to upload and display images in a responsive 3-column grid with optional captions.
Key Changes
Frontend (Admin & Public)
picture-gridto the layout types array with custom SVG iconrenderPictureGridLayout()to display images in a 3-column grid with optional captions in the admin interfacerenderPictureGridPublic()to display only visible items with images on the public viewpreviewPictureGridImage()andremovePictureGridImage()helpers for client-side image handlingBackend
POST /api/custom-sections/:id/items/:itemId/picturefor image uploads using multer with 5MB file size limit and JPEG/PNG/WebP validationcs_${sectionId}_${itemId}_${timestamp}${ext})imagecolumn incustom_section_itemstableVersion & Documentation
Implementation Details
/uploadsdirectory with automatic cleanup on deletionpendingPictureGridFileandpictureGridRemovedflags to track changesaspect-ratio: 1for consistent square thumbnailshttps://claude.ai/code/session_01AD2TdNL3RDp5ynSrJr2tpN