/* Tweaks app for Highlight Partners HP - 3 palettes (sumi-gold / yuki-ai / kinari-shu) - per-section visibility toggles - CTA heading variant A/B/C */ const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "sumi-gold", "ctaVariant": "A", "showProblem": true, "showFeatures": true, "showService": true, "showVmv": true, "showMessage": true, "showFaq": true, "headlineSerif": "serif" }/*EDITMODE-END*/; // Palette previews (for the TweakColor swatch UI) const PALETTES = { "sumi-gold": ["#1B2A4A", "#B8963E", "#F7F5F2"], "yuki-ai": ["#14233a", "#9b8552", "#f1f1ec"], "kinari-shu": ["#8c2d1f", "#2a1812", "#f3ead9"], }; const PALETTE_LABELS = { "sumi-gold": "紺 × 金", "yuki-ai": "雪 × 藍", "kinari-shu": "生成 × 朱", }; function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); // Apply palette + CTA + visibility to the document React.useEffect(() => { document.documentElement.setAttribute("data-palette", t.palette); }, [t.palette]); React.useEffect(() => { document.body.setAttribute("data-cta", t.ctaVariant); }, [t.ctaVariant]); React.useEffect(() => { document.body.setAttribute("data-show-problem", String(!!t.showProblem)); document.body.setAttribute("data-show-features", String(!!t.showFeatures)); document.body.setAttribute("data-show-service", String(!!t.showService)); document.body.setAttribute("data-show-vmv", String(!!t.showVmv)); document.body.setAttribute("data-show-message", String(!!t.showMessage)); document.body.setAttribute("data-show-faq", String(!!t.showFaq)); }, [t.showProblem, t.showFeatures, t.showService, t.showVmv, t.showMessage, t.showFaq]); React.useEffect(() => { // Switch the hero headline font family between Serif (明朝) and Sans (ゴシック) document.documentElement.style.setProperty( "--headline-font", t.headlineSerif === "sans" ? "'Noto Sans JP', sans-serif" : "'Noto Serif JP', serif" ); document.querySelectorAll(".hero-headline__col, .section-title, .feature__title, .service-title, .message-quote, .cta-title, .vmv-block__statement, .problem-card__q, .hero__lede") .forEach(el => { el.style.fontFamily = "var(--headline-font)"; }); }, [t.headlineSerif]); // Find palette value for TweakColor const paletteOptions = Object.keys(PALETTES).map(k => PALETTES[k]); const currentPalette = PALETTES[t.palette]; const onPaletteChange = (arr) => { const key = Object.keys(PALETTES).find(k => JSON.stringify(PALETTES[k]) === JSON.stringify(arr)); if (key) setTweak("palette", key); }; return ( setTweak("headlineSerif", v)} /> setTweak("ctaVariant", v)} />
{t.ctaVariant === "A" && "案A:まずは、ご相談ください。"} {t.ctaVariant === "B" && "案B:経営のことを、一度整理してみませんか。"} {t.ctaVariant === "C" && "案C:一社一社の経営に、真摯に向き合います。"}
setTweak("showProblem", v)} /> setTweak("showFeatures", v)} /> setTweak("showService", v)} /> setTweak("showVmv", v)} /> setTweak("showMessage", v)} /> setTweak("showFaq", v)} />
); } const root = ReactDOM.createRoot(document.getElementById("tweaks-root")); root.render();