Initial commit: BlackDice site rebuild with integrated CMS

Rebuilds content management around a single admin route (/admin —
"BlackDice Studio"), replacing blackdice-studio.html. Publishing writes
one JSON content document instead of regenerating HTML files, so it can
no longer overwrite hand-made site changes the way the old tool did.

- /admin: click-to-edit copy/images, article CRUD with a Word-safe rich
  text editor, demo clip management, per-page SEO, enquiry log, publish
  history with rollback
- Real per-page URLs for all pages and articles, each with its own
  meta/canonical/OG/JSON-LD
- Newsroom + article pages driven by the CMS post library, seeded from
  the old studio's export (17 articles) plus a drafted GSMA Open Gateway
  press release awaiting approval
- Demo sections on Mobile SDK and Halo CPE, interactive by default and
  upgradable to an uploaded clip per slot
- Dependency-free Node API server (auth, publish, uploads, snapshots,
  leads, live sitemap)
- Deployment configs for Node/nginx/IIS, Vercel and Netlify

See docs/ARCHITECTURE.md, docs/PROJECT-STRUCTURE.md, docs/CMS-GUIDE.md
and docs/DEPLOYMENT.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-12 23:52:44 +05:00
co-authored by Claude Sonnet 5
commit 63a36e0dca
77 changed files with 19487 additions and 0 deletions
+96
View File
@@ -0,0 +1,96 @@
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { AnimatePresence, motion } from 'framer-motion'
import { THREAT_SCENARIOS } from './scenarios'
import { ThreatCinematic } from './ThreatDemo'
import '../demo.css'
const ACCENT = '#3BB586'
// Isolated so useNavigate() is only ever invoked when this is actually mounted
// under a <Router> — the embedded (no-router) instance never renders it.
function BackToSiteButton() {
const navigate = useNavigate()
return (
<button onClick={() => navigate('/')} style={{ display: 'inline-flex', alignItems: 'center', gap: 7, fontFamily: 'inherit', fontSize: 13, fontWeight: 500, color: 'rgba(255,255,255,.8)', background: 'rgba(255,255,255,.05)', border: '1px solid rgba(255,255,255,.12)', borderRadius: 100, padding: '7px 14px', cursor: 'pointer', flexShrink: 0 }}>← Back to site</button>
)
}
export default function ThreatDemosSlider({ embedded = false }: { embedded?: boolean } = {}) {
const [idx, setIdx] = useState(0)
const [dir, setDir] = useState(1)
const scenario = THREAT_SCENARIOS[idx]
const n = THREAT_SCENARIOS.length
const go = (next: number) => {
setDir(next > idx ? 1 : -1)
setIdx((next + n) % n)
}
return (
<div className="bd-demo-root" style={{ position: 'relative', height: embedded ? '100%' : '100vh', overflow: 'hidden', background: '#010e14', fontFamily: "'Ubuntu', -apple-system, system-ui, sans-serif", display: 'flex', flexDirection: 'column' }}>
{/* ── Top bar (reserved) — standalone /threat-demos only ── */}
{!embedded && (
<div style={{ flexShrink: 0, height: 60, display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '0 20px', borderBottom: '1px solid rgba(255,255,255,.06)', background: 'rgba(1,14,20,.7)', backdropFilter: 'blur(10px)', zIndex: 80 }}>
<BackToSiteButton />
<div style={{ textAlign: 'center', color: '#e8f4f3', minWidth: 0 }}>
<div style={{ fontSize: 14, fontWeight: 600, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{scenario.title}</div>
<div style={{ fontSize: 10.5, color: '#8aa5ab' }}>{idx + 1} / {n} · {scenario.product}</div>
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, background: 'rgba(0,0,0,.4)', border: '1px solid rgba(255,255,255,.1)', borderRadius: 100, padding: '5px 11px', flexShrink: 0 }}>
<motion.span animate={{ opacity: [1, 0, 1] }} transition={{ duration: 1.2, repeat: Infinity }} style={{ width: 7, height: 7, borderRadius: '50%', background: '#ef4444', display: 'inline-block' }} />
<span style={{ fontSize: 10, fontWeight: 700, color: '#fff', letterSpacing: '.5px' }}>REC</span>
</div>
</div>
)}
{/* ── Stage (flex, holds the sliding players) ── */}
<div style={{ position: 'relative', flex: 1, minHeight: 0, overflow: 'hidden' }}>
<AnimatePresence initial={false} custom={dir} mode="popLayout">
<motion.div
key={scenario.id}
custom={dir}
initial={{ x: dir > 0 ? '100%' : '-100%' }}
animate={{ x: 0 }}
exit={{ x: dir > 0 ? '-100%' : '100%' }}
transition={{ type: 'spring', stiffness: 260, damping: 30 }}
style={{ position: 'absolute', inset: 0 }}>
<ThreatCinematic scenario={scenario} autoPlay chrome={false} />
</motion.div>
</AnimatePresence>
{/* Prev / Next arrows (inside the stage, vertically centred) */}
<button onClick={() => go(idx - 1)} aria-label="Previous" style={navBtn('left')}>‹</button>
<button onClick={() => go(idx + 1)} aria-label="Next" style={navBtn('right')}>›</button>
</div>
{/* ── Bottom: scenario tabs (reserved) — moves above the stage on mobile via .bd-demo-tabs media query ── */}
<div className="bd-demo-tabs" style={{ flexShrink: 0, minHeight: 56, display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 8, flexWrap: 'wrap', padding: '10px 16px', borderTop: '1px solid rgba(255,255,255,.06)', background: 'rgba(1,14,20,.7)', backdropFilter: 'blur(10px)', zIndex: 80 }}>
{THREAT_SCENARIOS.map((s, i) => (
<button key={s.id} onClick={() => go(i)}
style={{
fontFamily: 'inherit', fontSize: 11, fontWeight: 500, cursor: 'pointer',
padding: '6px 12px', borderRadius: 100,
border: `1px solid ${i === idx ? ACCENT : 'rgba(255,255,255,.12)'}`,
background: i === idx ? 'rgba(59,181,134,0.18)' : 'rgba(255,255,255,.03)',
color: i === idx ? ACCENT : 'rgba(255,255,255,.6)', whiteSpace: 'nowrap',
}}>
{s.title}
</button>
))}
</div>
</div>
)
}
function navBtn(side: 'left' | 'right'): React.CSSProperties {
return {
position: 'absolute', top: '50%', transform: 'translateY(-50%)', [side]: 16,
zIndex: 70, width: 44, height: 44, borderRadius: '50%',
background: 'rgba(0,0,0,.45)', backdropFilter: 'blur(10px)',
border: '1px solid rgba(255,255,255,.14)', color: '#e8f4f3',
fontSize: 22, lineHeight: 1, cursor: 'pointer', fontFamily: 'inherit',
display: 'flex', alignItems: 'center', justifyContent: 'center',
} as React.CSSProperties
}