feat(dsoc): cap project gallery at 5, show as a slider#46
Merged
Conversation
- Admin create + edit forms cap gallery at 5 images. The picker is disabled at the limit, the label shows the n/5 count, and selecting more than the remaining quota in one go silently trims to the remainder with a clear message about what was dropped. - Project detail page renders the gallery as a Swiper slider (navigation arrows, clickable pagination dots, keyboard arrow support, loop when there's more than one image) instead of the earlier thumbnail grid. Clicking a slide still opens the lightbox. - Slider styled to match the neo-brutalist DSOC theme. No schema change. The 5-image cap is enforced client-side in the only two places that write to gallery (both admin forms); existing projects with >5 entries continue to render fine.
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
Two changes on top of the existing gallery feature:
Reuses the existing `swiper` dependency (already used on the blog page) so no new deps.
Test plan
🤖 Generated with Claude Code