diff --git a/web/sections/AddComponentDialog.tsx b/web/sections/AddComponentDialog.tsx index e5cb9cd..0c3f72d 100644 --- a/web/sections/AddComponentDialog.tsx +++ b/web/sections/AddComponentDialog.tsx @@ -30,6 +30,7 @@ export type ComponentKind = | 'contact-form' | 'partners' | 'collections' + | 'collection-cover' | 'collection-title' | 'collection-description' | 'collection-specs' @@ -42,6 +43,7 @@ export type ComponentKind = block: one that is available, adds cleanly, and silently does nothing. */ export const SUBJECT_KINDS: ComponentKind[] = [ + 'collection-cover', 'collection-title', 'collection-description', 'collection-specs', @@ -96,6 +98,7 @@ export const CHOICES: Choice[] = [ They hold nothing — not even a reference. The subject is the URL, so one block draws a different collection on every request, and that is what lets one arrangement serve all of them. */ + { kind: 'collection-cover', label: 'Its lead photograph', hint: 'The first in its gallery, large', Icon: Image }, { kind: 'collection-title', label: 'Its name', hint: 'The collection this page is about', Icon: Heading }, { kind: 'collection-description', label: 'Its description', hint: 'What was written about it', Icon: Type }, { kind: 'collection-specs', label: 'Its specs', hint: 'Measurement, material, colours, delivery', Icon: Ruler }, diff --git a/web/sections/PageBuilderPanel.tsx b/web/sections/PageBuilderPanel.tsx index 11c5faf..2f85ad4 100644 --- a/web/sections/PageBuilderPanel.tsx +++ b/web/sections/PageBuilderPanel.tsx @@ -23,6 +23,11 @@ const LABELS: Record = { 'contact-form': 'Contact form', partners: 'Partners', collections: 'Collections', + 'collection-cover': 'Lead photograph', + 'collection-title': 'Name', + 'collection-description': 'Description', + 'collection-specs': 'Specs', + 'collection-gallery': 'Photographs', }; /* @@ -31,7 +36,17 @@ const LABELS: Record = { Both the picker and the canvas ask the same question — one to decide whether to open an editor, the other whether to draw an Edit button — and two lists would drift into a button that opens nothing. */ -const PLACES_ONLY: string[] = ['contact-form', 'partners', 'collections']; +const PLACES_ONLY: string[] = [ + 'contact-form', + 'partners', + 'collections', + // The subject blocks hold nothing either: what they draw is the collection the URL names. + 'collection-cover', + 'collection-title', + 'collection-description', + 'collection-specs', + 'collection-gallery', +]; import { AddSectionDialog, type SectionLayout } from './AddSectionDialog'; import { FreeTextEditor } from './FreeTextEditor'; import { SpacingEditor, type Padding } from './SpacingEditor';