// Clooks landing site — core (nav, logo, tweaks, palette)
// ------------------------------------------------------------
const TWEAKS = /*EDITMODE-BEGIN*/{
"accent": "#fbbf24",
"installCmd": "claude plugin marketplace add codestripes-dev/clooks-marketplace",
"heroVariant": "split"
}/*EDITMODE-END*/;
const COL = {
bg: '#0a0a0a',
bgElev: '#0f0f0f',
bgCode: '#0c0c0c',
bgSoft: '#131313',
line: 'rgba(255,255,255,0.08)',
lineStrong: 'rgba(255,255,255,0.14)',
fg: '#f5f5f2',
fgMute: '#a1a1aa',
fgDim: '#71717a',
fgFaint: '#52525b',
red: '#f87171',
green: '#34d399',
yellow: '#fbbf24',
};
function TweaksPanel({ tweaks, setTweaks, visible }) {
if (!visible) return null;
const update = (patch) => {
const next = { ...tweaks, ...patch };
setTweaks(next);
window.parent.postMessage({ type: '__edit_mode_set_keys', edits: patch }, '*');
};
return (
Tweaks
Accent color
{['#fbbf24', '#f97316', '#34d399', '#60a5fa', '#a78bfa', '#f472b6'].map(c => (
update({ accent: c })}
style={{
width: 28, height: 28, background: c, border: tweaks.accent === c ? '2px solid #fff' : '1px solid rgba(255,255,255,0.2)',
cursor: 'pointer', padding: 0,
}} />
))}
Install command
update({ installCmd: e.target.value })}
style={{
width: '100%', background: '#0a0a0a', border: `1px solid ${COL.line}`,
color: COL.fg, padding: '8px 10px', fontSize: 11,
fontFamily: 'JetBrains Mono, monospace', boxSizing: 'border-box',
}}
/>
Hero layout
{[{ id: 'code', label: 'Stacked' }, { id: 'split', label: 'Split' }].map(v => (
update({ heroVariant: v.id })}
style={{
flex: 1, padding: '6px 8px', fontSize: 11,
background: tweaks.heroVariant === v.id ? tweaks.accent : 'transparent',
color: tweaks.heroVariant === v.id ? '#0a0a0a' : COL.fg,
border: `1px solid ${tweaks.heroVariant === v.id ? tweaks.accent : COL.line}`,
cursor: 'pointer', fontFamily: 'inherit',
}}>
{v.label}
))}
);
}
function Logo({ accent }) {
return (
);
}
function Nav({ accent }) {
const linkStyle = { color: COL.fgMute, fontSize: 13, textDecoration: 'none', padding: '6px 0' };
return (
);
}
function SectionLabel({ accent, children }) {
return (
{children}
);
}
// Generic code block with a fake title bar + line numbers
// Each line is either a string (raw) or an array of [color, text] tuples
function CodeCard({ title, badge, badgeColor, lines, lineNumbers = true, compact = false, maxWidth }) {
return (
{(title || badge) && (
{title && }
{title}
{badge && {badge} }
)}
{lineNumbers && (
{lines.map((_, i) =>
{i + 1}
)}
)}
{lines.map((l, i) => (
{renderLine(l)}
))}
);
}
function renderLine(l) {
if (l == null || l === '') return '\u00a0';
if (typeof l === 'string') return l;
// array of spans
return l.map((s, i) => typeof s === 'string'
? {s}
: {s[1]} );
}
// Syntax palette
const TK = {
kw: '#c084fc',
str: '#a3e635',
fn: '#f5f5f2',
com: COL.fgDim,
ty: '#7dd3fc',
prop: '#fde68a',
num: '#fda4af',
op: '#e4e4e7',
};
Object.assign(window, { TWEAKS, COL, TK, TweaksPanel, Logo, Nav, SectionLabel, CodeCard, renderLine });