No description
Follow-up to "mach das bitte auch für alle Startseiten-Sektionen" - the request was for the same drag experience across all six homepage text sections, but they split into two structurally different groups and got two different (both live-preview-driven) treatments rather than forcing one interaction model onto both: - Hero and the YouTube section have a real background (image, video) behind the text, structurally identical to the gallery cards - these get full continuous 2D drag positioning, reusing the same "left/top + translate(-x%,-y%)" technique. New home_sections.text_align_x/_y (TINYINT UNSIGNED 0-100, default 50/50 = centered, matching current behavior) sit alongside the existing text_align column rather than replacing it, since the other four sections still need it. - Craft, Advice, Insights, and "More than car-hifi" are normal paragraph text next to a separate image column, with no background to drag over - text-align (left/center/right) is the actually correct tool for how wrapped paragraph lines align, the same way word processors use alignment buttons rather than a position slider for body text. These keep the existing text_align enum, but the admin page (HomeSections.jsx) replaces the old bare <select> with an actual rendered live preview (title/eyebrow/body snippet in a mock card) instead of leaving these four with zero visual feedback. Renamed the shared positioning helper from galleryCardAlign.js / galleryCardLabelStyle() to dragAnchorPosition.js / dragAnchorStyle() (now takes a per-caller default so gallery cards keep their bottom- anchored default while Home.jsx sections default to centered) since it's no longer gallery-specific - three call sites updated. Restructured Hero and the YouTube section in Home.jsx so the drag-set static position doesn't fight with existing animation: Hero already composes a scroll-linked parallax transform (framer-motion) and an entrance fade-in on nested motion.div elements, both of which manage their own `transform` internally - inserting a new plain (non-motion) div between them for the percentage-based positioning keeps the static placement and the two animations from touching the same CSS property. Verified against the local database directly via PHP CLI: hero/youtube default to 50/50 (centered, no visual change from before), and an arbitrary pair (25/80) written to hero round-trips correctly through HomeSectionController::index(), then removed the test row. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| hifi | ||
| hifi-src | ||
| .gitignore | ||
| DEPLOY.md | ||