Add editable PRISM homepage section

This commit is contained in:
nmemmert
2026-05-20 09:00:22 -04:00
parent c66be30b20
commit 67f3caf40b
5 changed files with 193 additions and 3 deletions
+15 -3
View File
@@ -189,7 +189,7 @@ type AdminView =
| 'emails' | 'subscribers' | 'contacts'
| 'seo' | 'legal' | 'security' | 'brand' | 'global'
type MainContentSection = 'hero' | 'start-here' | 'about' | 'contact' | 'series' | 'share' | 'global'
type MainContentSection = 'hero' | 'start-here' | 'about' | 'contact' | 'series' | 'share' | 'prism' | 'global'
const BRAND_KIT_SWATCHES = [
{ name: 'Rich Black', hex: '#0a0a08', role: 'Primary background' },
@@ -276,6 +276,18 @@ const FIELDS: Array<{ key: StringField; label: string; multiline?: boolean; sect
{ key: 'studyGuideUrl', label: 'Study Guide URL (Amazon link)', section: 'series' },
{ key: 'shareHeading', label: 'Share Section — Heading', section: 'share' },
{ key: 'shareP', label: 'Share Section — Paragraph', multiline: true, section: 'share' },
{ key: 'prismVideoUrl', label: 'PRISM — Video URL', section: 'prism' },
{ key: 'prismEyebrow', label: 'PRISM — Eyebrow', section: 'prism' },
{ key: 'prismHeading', label: 'PRISM — Heading', section: 'prism' },
{ key: 'prismIntro', label: 'PRISM — Intro Text', multiline: true, section: 'prism' },
{ key: 'prismPatternIntro', label: 'PRISM — Pattern Intro', multiline: true, section: 'prism' },
{ key: 'prismStep1', label: 'PRISM — Step 1', section: 'prism' },
{ key: 'prismStep2', label: 'PRISM — Step 2', section: 'prism' },
{ key: 'prismStep3', label: 'PRISM — Step 3', section: 'prism' },
{ key: 'prismStep4', label: 'PRISM — Step 4', section: 'prism' },
{ key: 'prismStep5', label: 'PRISM — Step 5', section: 'prism' },
{ key: 'prismOutro', label: 'PRISM — Outro Text', multiline: true, section: 'prism' },
{ key: 'prismClosing', label: 'PRISM — Closing Line', multiline: true, section: 'prism' },
// Global / Footer / Platform
{ key: 'footerTitle', label: 'Footer — Brand Title', section: 'global' },
{ key: 'footerSubtitle', label: 'Footer — Subtitle', section: 'global' },
@@ -2457,9 +2469,9 @@ export default function AdminPage({ content, onSave, onLogout }: Props) {
<section className="admin-panel-section">
<div className="admin-panel-head">
<h2>Homepage</h2>
<p>Controls the hero, button labels, share section, and "Where to Next" navigation cards.</p>
<p>Controls the hero, share section, PRISM video block, and "Where to Next" navigation cards.</p>
</div>
{FIELDS.filter(f => f.section === 'hero' || f.section === 'share').map(({ key, label, multiline }) => (
{FIELDS.filter(f => f.section === 'hero' || f.section === 'share' || f.section === 'prism').map(({ key, label, multiline }) => (
<div className="admin-field" key={key}>
<label htmlFor={`field-${key}`}>{label}</label>
{multiline