From eb1d3ddd9cca3ecc98e9f917759c312d0d4ec367 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Wed, 26 Aug 2026 08:16:36 -0400 Subject: [PATCH] Add Books + editable Recommended Resources sections; improve content block links; v1.1.38 - CustomBlock: add linkUrl/linkLabel fields for a styled button below the body - Body text auto-linkifies raw URLs into gold anchor tags - New 'books' placement: Reading List grid on Downloads page (cover, desc, Amazon btn) - New 'recommended' placement: editable Recommended Resources section on Downloads page; falls back to Truth For Life widget when empty - Admin: Books and Recommended Resources panels added to Content nav Co-Authored-By: Claude Sonnet 4.6 --- package.json | 2 +- src/AdminPage.tsx | 122 ++++++++++++++++++++++++++++++++++++++- src/App.css | 142 ++++++++++++++++++++++++++++++++++++++++++++++ src/App.tsx | 83 ++++++++++++++++++++++++++- src/content.ts | 4 +- 5 files changed, 348 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4d7425d..d8534f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "siteforge", "private": true, - "version": "1.1.37", + "version": "1.1.38", "type": "module", "scripts": { "dev": "vite", diff --git a/src/AdminPage.tsx b/src/AdminPage.tsx index bc79e04..281ac5e 100644 --- a/src/AdminPage.tsx +++ b/src/AdminPage.tsx @@ -699,7 +699,7 @@ type StringField = Exclude) { if (placement === 'footer') return 'Footer navigation links' if (placement === 'otherSites') return 'Other site links in footer dropdown' if (placement === 'externalSites') return 'Homepage external site links' + if (placement === 'books') return 'Downloads page (Reading List)' + if (placement === 'recommended') return 'Downloads page (Recommended Resources)' return 'Downloads page (More Resources)' } function getCustomLinkPreviewPath(placement: CustomLink['placement']) { if (placement === 'resources') return '/resources' + if (placement === 'books') return '/resources' + if (placement === 'recommended') return '/resources' return '/' } @@ -2162,6 +2168,26 @@ async function handleAssetUpload(event: ChangeEvent) { })) } + function addBook() { + setForm(f => ({ + ...f, + customLinks: [ + ...(f.customLinks ?? []), + { id: Date.now().toString(36), label: '', url: '', imageUrl: '', description: '', amazonUrl: '', amazonLabel: 'View on Amazon', placement: 'books' as const }, + ], + })) + } + + function addRecommended() { + setForm(f => ({ + ...f, + customLinks: [ + ...(f.customLinks ?? []), + { id: Date.now().toString(36), label: '', url: '', imageUrl: '', description: '', placement: 'recommended' as const }, + ], + })) + } + function updateLink(id: string, field: keyof CustomLink, value: string | string[]) { setForm(f => ({ ...f, @@ -3828,6 +3854,14 @@ async function handleAssetUpload(event: ChangeEvent) {