HifiPlanet-Website/hifi/index.html
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

53 lines
2.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="/favicon.png" />
<!-- Nur fuer die Paket-Kacheln auf der Modell-Seite (Name/Preis-Typografie im
Kunden-Referenzdesign) - der Rest der Seite bleibt beim Standard-Font. -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600&family=Michroma&display=swap" rel="stylesheet" />
<title>HifiPlanet | Car-Hifi Umbauten nach Maß</title>
<meta name="description" content="HifiPlanet – dein Car-Hifi Spezialist. Marke und Modell wählen, passende Sound-Pakete entdecken und unverbindlich anfragen." />
<link rel="canonical" href="https://hifi-planet.de/" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="HifiPlanet" />
<meta property="og:title" content="HifiPlanet | Car-Hifi Umbauten nach Maß" />
<meta property="og:description" content="Dein Car-Hifi Spezialist: Marke und Modell wählen, passende Sound-Pakete entdecken und unverbindlich anfragen." />
<meta property="og:locale" content="de_DE" />
<meta name="twitter:card" content="summary" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "AutoRepair",
"name": "HifiPlanet",
"description": "Car-Hifi Spezialist für individuelle Sound-Umbauten – vom unauffälligen Upgrade bis zum Komplettumbau.",
"url": "https://hifi-planet.de/",
"telephone": "+4993732062390",
"email": "info@hifi-planet-amorbach.de",
"address": {
"@type": "PostalAddress",
"streetAddress": "Boxbrunner Str. 20a",
"postalCode": "63916",
"addressLocality": "Amorbach",
"addressCountry": "DE"
},
"openingHoursSpecification": [
{ "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"], "opens": "09:00", "closes": "18:00" },
{ "@type": "OpeningHoursSpecification", "dayOfWeek": ["Saturday"], "opens": "10:00", "closes": "13:00" }
],
"sameAs": ["https://www.youtube.com/@hifiplanet2812"]
}
</script>
<script type="module" crossorigin src="/assets/index-Ddoucb3i.js"></script>
<link rel="modulepreload" crossorigin href="/assets/lucide-icons-Cg2IxtAO.js">
<link rel="stylesheet" crossorigin href="/assets/index-CxsdIqOv.css">
</head>
<body class="bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100">
<div id="root"></div>
</body>
</html>