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>
31 lines
975 B
JavaScript
31 lines
975 B
JavaScript
/** @type {import('tailwindcss').Config} */
|
|
export default {
|
|
darkMode: 'class',
|
|
content: ['./index.html', './src/**/*.{js,jsx}'],
|
|
theme: {
|
|
extend: {
|
|
// Greift die globale Website-Schriftart auf (siehe app_settings.site_font, gesetzt von
|
|
// SiteSettingsContext.jsx als CSS-Variable auf <html>) - ohne eigene Auswahl faellt es auf
|
|
// Tailwinds Standard-Systemschriftstapel zurueck. Tailwinds Preflight wendet font-sans
|
|
// bereits global auf <html> an, dadurch greift die Variable praktisch ueberall.
|
|
fontFamily: {
|
|
sans: 'var(--site-font, ui-sans-serif, system-ui, sans-serif)',
|
|
},
|
|
colors: {
|
|
brand: {
|
|
50: '#f5fbee',
|
|
100: '#e9f6da',
|
|
200: '#d3eeb4',
|
|
300: '#b6e382',
|
|
400: '#92d444',
|
|
500: '#6ba626',
|
|
600: '#58891f',
|
|
700: '#48701a',
|
|
800: '#3b5b15',
|
|
900: '#304b11',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [],
|
|
};
|