// src/components.jsx // Shared primitives used by both V1 and V2. const { useState, useEffect, useRef } = React; // ── Logo ─────────────────────────────────────────────────────────────────── // Speech-bubble "M" mark + stacked "Prompt Mode" wordmark, matching the // brand. Wordmark recolored for dark background: PROMPT in off-white, // MODE in brand yellow. function Logo({ size = 32, showWordmark = true }) { return ( {showWordmark && ( Prompt Mode )} ); } // ── Nav ──────────────────────────────────────────────────────────────────── function Nav({ page, onNavigate, style = 'default' }) { // style: 'default' (V1, restrained) | 'terminal' (V2, monospaced) const items = [ { id: 'home', label: 'The Challenge' }, { id: 'about', label: 'About' }, { id: 'kit', label: 'Newsletter', terminal: 'Newsletter' }, ]; const isTerminal = style === 'terminal'; return ( ); } // ── Footer ───────────────────────────────────────────────────────────────── function Footer({ style = 'default', onNavigate }) { const isTerminal = style === 'terminal'; return ( ); } // ── Placeholder media ────────────────────────────────────────────────────── function Placeholder({ label, ratio = '16/9', minH, style = {} }) { return (
{label}
); } // ── EmailForm — static visual, doesn't submit ────────────────────────────── function EmailForm({ style = 'default', cta = 'Send Me the Free Starter Kit →' }) { const isTerminal = style === 'terminal'; const inputBg = isTerminal ? 'rgba(0,0,0,0.35)' : 'rgba(255,255,255,0.05)'; const inputBorder = isTerminal ? '1px solid rgba(4,168,234,0.35)' : '1px solid rgba(255,255,255,0.15)'; return (
e.preventDefault()} style={{ width: '100%' }}>
{ e.target.style.borderColor = '#04a8ea'; }} onBlur={(e) => { e.target.style.borderColor = isTerminal ? 'rgba(4,168,234,0.35)' : 'rgba(255,255,255,0.15)'; }} />
No spam. Unsubscribe anytime. Educational purposes only.
); } // ── Eyebrow ──────────────────────────────────────────────────────────────── function Eyebrow({ children, dot = false, style = {} }) { return (
{dot && } {children}
); } // ── Disclaimer line (inline, above footer when earnings discussed) ───────── function InlineDisclaimer() { return (
Educational purposes only. Results vary. Not financial advice. Full disclaimer at promptmode.io/disclaimer.
); } Object.assign(window, { Logo, Nav, Footer, Placeholder, EmailForm, Eyebrow, InlineDisclaimer, });