HifiPlanet-Website/hifi/index.html
Maaxxs a3767b1c0f Extend text styling to brand/model names and package text, add bold bullets
Rolls the generic text_styles mechanism out to three more areas (Phase 3/4
of the earlier text-styling plan): brands.name, car_models.name,
packages.description and packages.price_text. Registry entries reuse each
table's existing manage permission (brands.manage/models.manage/
packages.manage). Widgets are gated on an existing row (editingId in
Brands.jsx/Models.jsx, row.existing in Packages.jsx's batch editor), since
a newly-created row has no id yet to key a style on.

Added fieldStyle()/useTextStylesMap() to TextStylesContext.jsx alongside
the existing useTextStyle() - brand/model lists are open-ended, so styling
each one from inside a .map() can't call a hook per item (rules of hooks);
fieldStyle() does a plain lookup against the already-loaded styles map
instead. pkg.name stays unstyled (it's chosen from a fixed tier list, not
free text).

Deleting a brand cascades to its models and their packages in the
database, so BrandController/ModelController::destroy() now collect the
cascaded ids first and clean up their text_styles rows too (mirroring how
they already do this for orphaned uploaded images); SettingsController's
catalog reset endpoints get the same cleanup in bulk.

Separately: package descriptions can now mark individual bullet points
bold. Packages.jsx gained a "Fett" button that wraps the current textarea
selection in **markers** (one line per bullet is unchanged); the public
ModelPage.jsx renders those through a new BoldText.jsx component that
turns **text** into <strong> via a plain regex - no dangerouslySetInnerHTML,
since the only possible output is a <strong> tag. Product-name bullets
(scraped from the linked shop, not admin-authored) are unaffected.

Verified locally: registry rejects packages.name (not free text) and a
non-numeric id, and deleting a test brand correctly cascades text_styles
cleanup through its model and package.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 03:15:53 +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-kZ4ovh9r.js"></script>
<link rel="modulepreload" crossorigin href="/assets/lucide-icons-Cg2IxtAO.js">
<link rel="stylesheet" crossorigin href="/assets/index-lUKoqEad.css">
</head>
<body class="bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100">
<div id="root"></div>
</body>
</html>