Add admin-editable QR code image to homepage share section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-06-16 10:03:21 -04:00
parent 48c2f81d00
commit 47887d7fbd
3 changed files with 6 additions and 1 deletions
+3
View File
@@ -870,6 +870,7 @@ const FIELDS: Array<{ key: StringField; label: string; multiline?: boolean; sect
{ key: 'studyGuideUrl', label: 'Study Guide URL (Amazon link)', section: 'series' }, { key: 'studyGuideUrl', label: 'Study Guide URL (Amazon link)', section: 'series' },
{ key: 'shareHeading', label: 'Share Section — Heading', section: 'share' }, { key: 'shareHeading', label: 'Share Section — Heading', section: 'share' },
{ key: 'shareP', label: 'Share Section — Paragraph', multiline: true, section: 'share' }, { key: 'shareP', label: 'Share Section — Paragraph', multiline: true, section: 'share' },
{ key: 'shareQrImageUrl', label: 'Share Section — QR Code Image', section: 'share' },
{ key: 'prismVideoUrl', label: 'PRISM — Video URL', section: 'prism' }, { key: 'prismVideoUrl', label: 'PRISM — Video URL', section: 'prism' },
{ key: 'prismEyebrow', label: 'PRISM — Eyebrow', section: 'prism' }, { key: 'prismEyebrow', label: 'PRISM — Eyebrow', section: 'prism' },
{ key: 'prismHeading', label: 'PRISM — Heading', section: 'prism' }, { key: 'prismHeading', label: 'PRISM — Heading', section: 'prism' },
@@ -3577,6 +3578,8 @@ export default function AdminPage({ content, onSave, onLogout }: Props) {
{multiline {multiline
? <textarea id={`field-${key}`} value={form[key] as string} onChange={e => handleChange(key, e.target.value)} rows={4} /> ? <textarea id={`field-${key}`} value={form[key] as string} onChange={e => handleChange(key, e.target.value)} rows={4} />
: <input id={`field-${key}`} type="text" value={form[key] as string} onChange={e => handleChange(key, e.target.value)} />} : <input id={`field-${key}`} type="text" value={form[key] as string} onChange={e => handleChange(key, e.target.value)} />}
{key.includes('ImageUrl') && renderImageAssetSelector(form[key] as string, value => handleChange(key, value), `field-${key}-asset`)}
{key.includes('ImageUrl') && renderImagePreview(form[key] as string, `${label} preview`)}
</div> </div>
))} ))}
+1 -1
View File
@@ -1446,7 +1446,7 @@ function LandingPage({ content }: { content: SiteContent }) {
<p className="share-p">{content.shareP || 'Scan the QR code or text the show link to a friend who needs encouragement today.'}</p> <p className="share-p">{content.shareP || 'Scan the QR code or text the show link to a friend who needs encouragement today.'}</p>
<ShareShowButton /> <ShareShowButton />
</div> </div>
<img src="/images/qr-code.jpg" alt="QR code to share the show" className="share-qr" /> <img src={content.shareQrImageUrl || '/images/qr-code.jpg'} alt="QR code to share the show" className="share-qr" />
</div> </div>
</section> </section>
+2
View File
@@ -174,6 +174,7 @@ export interface SiteContent {
// ── Share ── // ── Share ──
shareHeading: string shareHeading: string
shareP: string shareP: string
shareQrImageUrl: string
// ── PRISM Video ── // ── PRISM Video ──
prismVideoUrl: string prismVideoUrl: string
prismEyebrow: string prismEyebrow: string
@@ -363,6 +364,7 @@ export const DEFAULTS: SiteContent = {
colossiansStudySections: DEFAULT_COLOSSIANS_STUDY_SECTIONS, colossiansStudySections: DEFAULT_COLOSSIANS_STUDY_SECTIONS,
shareHeading: 'Help one more person hear the Word this week.', shareHeading: 'Help one more person hear the Word this week.',
shareP: 'Scan the QR code or text the show link to a friend who needs encouragement today.', shareP: 'Scan the QR code or text the show link to a friend who needs encouragement today.',
shareQrImageUrl: '/images/qr-code.jpg',
prismVideoUrl: '/images/PRISM.mp4', prismVideoUrl: '/images/PRISM.mp4',
prismEyebrow: 'Featured Video', prismEyebrow: 'Featured Video',
prismHeading: 'PRISM', prismHeading: 'PRISM',