/* Tweaks for Wardrobe by Dipal home — applies to CSS variables / attributes on a static page */
const ACCENTS = {
'#b9614a': { deep:'#8f4631', soft:'#ecd9cd' }, // terracotta
'#b15a6b': { deep:'#8a3f4f', soft:'#ecd5da' }, // rose
'#c08a3e': { deep:'#946420', soft:'#efe0c4' }, // marigold
'#7c7a45': { deep:'#585829', soft:'#e4e2cf' }, // olive
'#855075': { deep:'#623653', soft:'#e6d6e2' }, // plum
};
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"accent": "#b9614a",
"heading": "serif",
"overlay": "soft",
"headline": "Drape in confidence"
}/*EDITMODE-END*/;
function HomeTweaks(){
const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);
React.useEffect(()=>{
const root = document.documentElement;
const a = ACCENTS[t.accent] || ACCENTS['#b9614a'];
root.style.setProperty('--accent', t.accent);
root.style.setProperty('--accent-deep', a.deep);
root.style.setProperty('--accent-soft', a.soft);
root.setAttribute('data-heading', t.heading);
root.setAttribute('data-overlay', t.overlay);
const h = document.getElementById('heroHeadline');
if(h) h.textContent = t.headline || 'Drape in confidence';
}, [t]);
return (
setTweak('accent', v)} />
setTweak('heading', v)} />
setTweak('headline', v)} />
setTweak('overlay', v)} />
);
}
ReactDOM.createRoot(document.getElementById('tweaks-root')).render();