HifiPlanet-Website/hifi-src/src/pages/public
Maaxxs e9f68d054c Replace left/center/right buttons with real drag-and-drop positioning
Follow-up to the previous commit per explicit feedback: three preset
buttons weren't what was asked for - the ask was to grab the label in
the live preview and drag it directly.

Swaps app_settings.gallery_card_text_align (ENUM left/center/right,
one commit old) for gallery_card_text_x (TINYINT UNSIGNED 0-100, same
default position as before at 0). A discrete enum can't represent a
free-dragged position, so this is a real column replacement via
migration_gallery_card_drag.sql (drops the old column outright rather
than keeping both, since the old one is a single commit old and
unlikely to hold any real per-site customization yet).

The label is now positioned with `left: X%; transform: translateX(-X%)`
instead of a text-align class - the standard CSS trick for interpolating
a single percentage continuously between flush-left (X=0) and
flush-right (X=100, shifted back by its own width) with X=50 centering
it, so dragging feels continuous rather than snapping between three
fixed states. hifi-src/src/utils/galleryCardAlign.js now exports a
style-computing function instead of a class lookup table.

WebsiteSettings.jsx's preview label is draggable via Pointer Events
(setPointerCapture on pointerdown, so tracking keeps working even if
the cursor leaves the element mid-drag) with the card's own
getBoundingClientRect() converting cursor position to a 0-100 percent.
Kept small Links/Mittig/Rechts buttons as a secondary quick-jump
alongside the drag, not instead of it.

Verified against the local database directly via PHP CLI: default
comes back as 0, and an arbitrary value (73) written directly to the
column round-trips correctly through SiteSettingsController::show().

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 03:23:37 +02:00
..
AGB.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
BrandPage.jsx Add German/English language toggle for the storefront 2026-07-06 21:51:32 +02:00
ContactPage.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
Datenschutz.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
GalleryBrandPage.jsx Replace left/center/right buttons with real drag-and-drop positioning 2026-09-09 03:23:37 +02:00
GalleryOverview.jsx Replace left/center/right buttons with real drag-and-drop positioning 2026-09-09 03:23:37 +02:00
GalleryProjectPage.jsx Add German/English language toggle for the storefront 2026-07-06 21:51:32 +02:00
Home.jsx Make the homepage's main marketing text blocks editable 2026-09-09 02:51:00 +02:00
Impressum.jsx Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
Leistungen.jsx Fix mobile package card overflow, gate scroll hint on visibility, fix dead-end service links 2026-08-01 00:26:39 +02:00
ModelPage.jsx Repeat the wheel-scroll hint on an admin-configurable interval 2026-08-01 00:39:23 +02:00
SetupWizard.jsx Redesign navbar mobile menu and rework site color palette 2026-07-06 16:21:48 +02:00
VehicleSelect.jsx Add German/English language toggle for the storefront 2026-07-06 21:51:32 +02:00