/* global React, ReactDOM, useTweaks, TweaksPanel, TweakSection, TweakRadio, SiteHeader, SiteFooter, WhatsAppFAB, ScrollProgress, HomePage, ProductPage, KanbanPage, GanttPage, VideoPage, PricingPage, ContactPage, BlogIndexPage, BlogPostPage */ const { useState, useEffect } = React; const TWEAK_DEFAULTS = window.__TWEAK_DEFAULTS || { accent: 'bold', cardStyle: 'bordered' }; function App() { const [tweaks, setTweak] = useTweaks(TWEAK_DEFAULTS); const [route, setRoute] = useState('home'); const [postId, setPostId] = useState(null); // Apply tweaks to body useEffect(() => { document.body.dataset.accent = tweaks.accent; document.body.dataset.cardStyle = tweaks.cardStyle; }, [tweaks.accent, tweaks.cardStyle]); const go = (r) => { setRoute(r); setPostId(null); window.scrollTo({ top: 0 }); }; const openPost = (id) => { setPostId(id); setRoute('post'); window.scrollTo({ top: 0 }); }; const backToBlog = () => { setRoute('blog'); setPostId(null); window.scrollTo({ top: 0 }); }; return ( <>
{route === 'home' && } {route === 'product' && } {route === 'kanban' && } {route === 'gantt' && } {route === 'video' && } {route === 'pricing' && } {route === 'contact' && } {route === 'blog' && } {route === 'post' && }
setTweak('accent', v)} /> setTweak('cardStyle', v)} /> ); } ReactDOM.createRoot(document.getElementById('root')).render();