2026-09-18 07:50:09 -04:00
|
|
|
const TWEAKS_DEFAULTS = /*EDITMODE-BEGIN*/{
|
2026-10-05 09:21:14 -04:00
|
|
|
"accentPreset": "blue",
|
|
|
|
|
"accent": "#3b82f6",
|
|
|
|
|
"accentLight": "#60a5fa",
|
|
|
|
|
"primary": "#0a0a0a",
|
2026-09-18 07:50:09 -04:00
|
|
|
"headingFont": "Inter",
|
|
|
|
|
"monoFont": "JetBrains Mono",
|
|
|
|
|
"imageTreatment": "default",
|
|
|
|
|
"density": "comfortable",
|
|
|
|
|
"marquee": true,
|
2026-10-05 09:21:14 -04:00
|
|
|
"cursorGlow": true,
|
2026-09-18 07:50:09 -04:00
|
|
|
"showPartners": true,
|
|
|
|
|
"showStats": true,
|
|
|
|
|
"showServices": true,
|
2026-10-01 20:19:53 -04:00
|
|
|
"showCorridors": true,
|
2026-09-18 07:50:09 -04:00
|
|
|
"showTech": true,
|
|
|
|
|
"showOnSet": true,
|
|
|
|
|
"ctaLabel": "View Projects"
|
|
|
|
|
}/*EDITMODE-END*/;
|
|
|
|
|
|
2026-10-05 09:21:14 -04:00
|
|
|
const FONT_OPTIONS = ["Inter","Manrope","Space Grotesk","DM Sans","Outfit","Plus Jakarta Sans","IBM Plex Sans","Geist","Fraunces"];
|
|
|
|
|
const MONO_OPTIONS = ["JetBrains Mono","IBM Plex Mono","Space Mono","Roboto Mono","Fira Code","Geist Mono"];
|
|
|
|
|
|
|
|
|
|
const ACCENT_PRESETS = {
|
|
|
|
|
blue: { accent:"#3b82f6", accentLight:"#60a5fa", label:"Blue" },
|
|
|
|
|
ember: { accent:"#e25822", accentLight:"#f3895a", label:"Ember" },
|
|
|
|
|
amber: { accent:"#f59e0b", accentLight:"#fbbf24", label:"Amber" },
|
|
|
|
|
ruby: { accent:"#dc2626", accentLight:"#f87171", label:"Ruby" },
|
|
|
|
|
mono: { accent:"#e5e5e5", accentLight:"#ffffff", label:"Mono" },
|
|
|
|
|
};
|
|
|
|
|
|
2026-11-17 19:29:35 -05:00
|
|
|
var useTweaks = window.useTweaks || ((defaults) => [defaults, () => {}]);
|
|
|
|
|
|
2026-09-18 07:50:09 -04:00
|
|
|
function loadFont(family) {
|
2026-11-17 19:29:35 -05:00
|
|
|
if (family === "Inter" || family === "JetBrains Mono") return;
|
2026-09-18 07:50:09 -04:00
|
|
|
const id = "wd-font-" + family.replace(/\s/g,"-");
|
|
|
|
|
if (document.getElementById(id)) return;
|
|
|
|
|
const l = document.createElement("link");
|
|
|
|
|
l.id = id; l.rel = "stylesheet";
|
|
|
|
|
l.href = `https://fonts.googleapis.com/css2?family=${family.replace(/\s/g,"+")}:wght@300;400;500;600;700&display=swap`;
|
|
|
|
|
document.head.appendChild(l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function App() {
|
2026-10-05 09:21:14 -04:00
|
|
|
const [tweaks, setTweak] = useTweaks(TWEAKS_DEFAULTS);
|
2026-09-18 07:50:09 -04:00
|
|
|
const [openSlug, setOpenSlug] = React.useState(() => {
|
|
|
|
|
const m = location.hash.match(/#\/projects\/([\w-]+)/);
|
|
|
|
|
return m ? m[1] : null;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
|
if (openSlug) location.hash = `#/projects/${openSlug}`;
|
|
|
|
|
else if (location.hash.startsWith("#/projects/")) location.hash = "";
|
|
|
|
|
}, [openSlug]);
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
|
loadFont(tweaks.headingFont);
|
|
|
|
|
loadFont(tweaks.monoFont);
|
|
|
|
|
const r = document.documentElement.style;
|
|
|
|
|
r.setProperty("--color-accent", tweaks.accent);
|
|
|
|
|
r.setProperty("--color-accent-light", tweaks.accentLight);
|
|
|
|
|
r.setProperty("--color-primary", tweaks.primary);
|
|
|
|
|
r.setProperty("--font-inter", `"${tweaks.headingFont}"`);
|
|
|
|
|
r.setProperty("--font-mono-stack", `"${tweaks.monoFont}"`);
|
|
|
|
|
}, [tweaks]);
|
|
|
|
|
|
|
|
|
|
// Image treatment via class on body
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
|
document.body.dataset.imgTreat = tweaks.imageTreatment;
|
|
|
|
|
document.body.dataset.density = tweaks.density;
|
|
|
|
|
}, [tweaks.imageTreatment, tweaks.density]);
|
|
|
|
|
|
2026-10-05 09:21:14 -04:00
|
|
|
const onAccentPreset = (key) => {
|
|
|
|
|
const p = ACCENT_PRESETS[key];
|
|
|
|
|
if (!p) return;
|
|
|
|
|
setTweak({ accentPreset: key, accent: p.accent, accentLight: p.accentLight });
|
|
|
|
|
};
|
|
|
|
|
|
2026-09-18 07:50:09 -04:00
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{tweaks.cursorGlow && <CursorDot/>}
|
|
|
|
|
<Navigation/>
|
|
|
|
|
<Hero ctaLabel={tweaks.ctaLabel}/>
|
|
|
|
|
<Clients marquee={tweaks.marquee}/>
|
|
|
|
|
{tweaks.showPartners && <Partners/>}
|
|
|
|
|
<About/>
|
|
|
|
|
{tweaks.showStats && <Stats/>}
|
|
|
|
|
{tweaks.showServices && <Services/>}
|
2026-10-01 20:19:53 -04:00
|
|
|
{tweaks.showCorridors !== false && <RegionalCorridors/>}
|
2026-09-18 07:50:09 -04:00
|
|
|
<Projects onOpen={setOpenSlug}/>
|
|
|
|
|
{tweaks.showTech && <TechStack/>}
|
|
|
|
|
{tweaks.showOnSet && <OnSet/>}
|
|
|
|
|
<Contact/>
|
|
|
|
|
<Footer/>
|
|
|
|
|
|
|
|
|
|
{openSlug && <ProjectOverlay slug={openSlug} onClose={()=>setOpenSlug(null)} onOpen={setOpenSlug}/>}
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-17 19:29:35 -05:00
|
|
|
// ponytail: #root holds a static crawler snapshot; createRoot replaces it (hydrate mismatches on animated stats/typing).
|
|
|
|
|
const rootEl = document.getElementById("root");
|
2026-11-17 20:28:03 -05:00
|
|
|
// ponytail: mount after load+idle so the snapshot is the LCP paint, not React's re-render.
|
|
|
|
|
const mount = () => ReactDOM.createRoot(rootEl).render(<App/>);
|
|
|
|
|
const later = () => (window.requestIdleCallback ? requestIdleCallback(mount, { timeout: 1500 }) : setTimeout(mount, 1));
|
|
|
|
|
document.readyState === "complete" ? later() : addEventListener("load", later, { once: true });
|