HifiPlanet-Website/hifi-src/src/context
Maaxxs 17f331c35e Add global font selection with per-section override
Extracts the system-font list already used by RichTextEditor for mail
templates into a shared hifi-src/src/utils/fontOptions.js (frontend) and
App\Support\Fonts (backend), so it can drive two new pickers with a
consistent set of options.

Global: a new app_settings.site_font setting, exposed as an admin dropdown
in WebsiteSettings.jsx. tailwind.config.js now defines font-sans as
var(--site-font, ui-sans-serif, system-ui, sans-serif); Tailwind's
preflight already applies font-sans globally to <html>, so this alone
makes the chosen font cascade to virtually every text on the public site
without touching individual components. PublicLayout.jsx sets the CSS
variable from the fetched site settings.

Per-section override: a new home_sections.font_family column, editable
per homepage section in HomeSections.jsx ("Standard" = inherit the global
font). Home.jsx applies it as an inline style on each section's wrapper,
which naturally wins over the CSS-variable-driven global default when
set. Reveal.jsx gained an optional style prop (merged into its own
transform/opacity style) so the four flowing-text sections, which use it
directly as their wrapper, can receive the override too.

Verified locally: migration adds both columns without touching existing
rows, and both settings round-trip correctly through the database.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 00:12:01 +02:00
..
AuthContext.jsx PageSpeed/Lighthouse fixes: caching, images, touch targets, console noise 2026-07-07 02:40:57 +02:00
CookieConsentContext.jsx Add Google Analytics integration with consent-gated loading 2026-07-07 01:32:44 +02:00
LanguageContext.jsx Add German/English language toggle for the storefront 2026-07-06 21:51:32 +02:00
MaintenanceContext.jsx Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
SiteSettingsContext.jsx Add global font selection with per-section override 2026-09-10 00:12:01 +02:00
ThemeContext.jsx Default to dark mode outside 6:30-21:00 based on the visitor's clock 2026-07-07 02:17:48 +02:00