HifiPlanet-Website/hifi/api/database
Maaxxs ba4fa986d3 Make the homepage's main marketing text blocks editable
Extends the CMS work (Phase 5) to the content the user pointed out was
still missing, using the YouTube section as the concrete example: text,
alignment, and the button link weren't editable anywhere. Rather than
patch that one section, this builds the reusable pattern the user asked
for and applies it to every comparable text block on the homepage:
hero (text only, its two nav buttons stay fixed), the YouTube section,
the craft and consultation blocks, the gallery intro, and the "more
than car-hifi" block.

New home_sections table (bilingual DE/EN, like faqs, since the site has
a language switcher) + HomeSectionController, following the same
DB-row-with-built-in-defaults pattern as legal_pages: a section not yet
customized returns the exact text that used to be hard-coded in the
i18n dictionary, so nothing on a live site goes blank. New "Startseite"
admin page (content.manage, alongside FAQ) with per-section DE/EN tabs,
reusing the Phase 4 RichTextEditor for the body text and a plain
alignment dropdown. Wired into export/import (Settings -> Export &
Import) alongside the other content sections.

Alignment is applied via fixed left/center/right class lookup tables in
Home.jsx rather than a template-string class name, since Tailwind's
build-time scanner needs literal class names present in the source to
avoid purging them from the production CSS.

Known trade-off: two sections (hero, "more than car-hifi") previously
had hand-tuned responsive alignment that differed by breakpoint
(e.g. centered on mobile, left-aligned on desktop for "more"). Making
alignment a single admin-editable value necessarily replaces that with
one fixed choice at every breakpoint - simpler to reason about and
control, at the cost of that responsive nuance.

Verified end-to-end against the local database directly via PHP CLI
(bypassing a local Apache path-routing quirk unrelated to this change):
confirmed defaults come back correctly before any row exists, and that
saving and reading back a row round-trips correctly - then removed the
test row before finishing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 02:51:00 +02:00
..
migration_2fa.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_analytics.sql Add Google Analytics integration with consent-gated loading 2026-07-07 01:32:44 +02:00
migration_analytics_dashboard.sql Add Google Analytics dashboard widget (GA4 Data API integration) 2026-07-07 01:57:32 +02:00
migration_brand_model_images.sql Add image support for car brands and models 2026-09-09 01:42:40 +02:00
migration_business_stammdaten.sql Add CMS v1: editable business identity and legal pages 2026-09-09 02:03:59 +02:00
migration_faqs.sql Move FAQ management into the admin panel and cover it plus the gallery in export/import 2026-07-07 19:25:06 +02:00
migration_home_sections.sql Make the homepage's main marketing text blocks editable 2026-09-09 02:51:00 +02:00
migration_last_active.sql Track when each admin user was last active 2026-08-29 22:14:06 +02:00
migration_mail_settings.sql Add configurable SMTP email settings and contact-form email notifications 2026-07-07 00:54:17 +02:00
migration_maintenance.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_package_card_layout.sql Redesign package tiles as a dark, credit-card-style scroll strip with hue-sweeping tiers 2026-07-08 23:41:59 +02:00
migration_package_card_theme.sql Add selectable package card color themes and refine the feature list styling 2026-07-08 10:28:05 +02:00
migration_package_design.sql Make package cards configurable and give them a proper tiered design 2026-07-07 21:13:55 +02:00
migration_package_price_text.sql Implement client feedback: calmer cursor, price override text, 3D coverflow layout 2026-07-12 15:13:08 +02:00
migration_package_wheel_hint_interval.sql Repeat the wheel-scroll hint on an admin-configurable interval 2026-08-01 00:39:23 +02:00
migration_permissions.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_services.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_site_settings.sql Add admin-configurable website settings and VIN field to contact form 2026-07-06 15:28:11 +02:00
migration_upgrades.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
schema.sql Make the homepage's main marketing text blocks editable 2026-09-09 02:51:00 +02:00