// gtc-tweaks.jsx — Tweaks panel config for Gestiona Tu Centro
// Persists to localStorage so changes apply across all pages.
const GTC_TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"palette": "azul",
"fontFamily": "Plus Jakarta Sans",
"fontScale": 1,
"density": 1,
"heroStyle": "photo",
"dark": false
}/*EDITMODE-END*/;
const FONT_FAMILIES = {
"Plus Jakarta Sans": '"Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif',
"Inter": '"Inter", -apple-system, BlinkMacSystemFont, sans-serif',
"DM Sans": '"DM Sans", -apple-system, BlinkMacSystemFont, sans-serif',
};
function GTCApp() {
const [t, setTweak] = useTweaks(GTC_TWEAK_DEFAULTS);
// Apply tweaks to
React.useEffect(() => {
const root = document.documentElement;
// Theme
if (t.dark) root.setAttribute('data-theme', 'dark');
else root.removeAttribute('data-theme');
// Density
root.style.setProperty('--density', String(t.density));
// Font scale
root.style.setProperty('--font-scale', String(t.fontScale));
// Font family
const fontStack = FONT_FAMILIES[t.fontFamily] || FONT_FAMILIES["Plus Jakarta Sans"];
root.style.setProperty('--font-sans', fontStack);
// Palette
const palettes = window.GTC_PALETTES || {};
const p = palettes[t.palette];
if (p) Object.entries(p).forEach(([k, v]) => root.style.setProperty(k, v));
// Hero style
root.setAttribute('data-hero', t.heroStyle);
applyHeroVariant(t.heroStyle);
// Persist to localStorage so other pages get the same look
try {
localStorage.setItem('gtc-tweaks', JSON.stringify({
theme: t.dark ? 'dark' : 'light',
density: t.density,
fontScale: t.fontScale,
fontFamily: fontStack,
palette: t.palette,
heroStyle: t.heroStyle,
}));
} catch (e) {}
}, [t]);
return (