create-bearminion 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/template/AGENTS.md +1 -1
  5. package/template/README.md +5 -5
  6. package/template/astro.config.ts +16 -4
  7. package/template/bearminion.lock.json +80 -132
  8. package/template/content/pages/about.json +2 -2
  9. package/template/content/pages/index.json +23 -237
  10. package/template/content/site.json +2 -10
  11. package/template/package.json +1 -1
  12. package/template/src/components/organisms/EntryList.astro +83 -0
  13. package/template/src/components/organisms/Pagination.astro +56 -0
  14. package/template/src/components/sections/components.gen.ts +0 -10
  15. package/template/src/components/sections/definitions.gen.ts +0 -10
  16. package/template/src/components/sections/faq/definition.ts +2 -2
  17. package/template/src/components/sections/media/Media.astro +2 -2
  18. package/template/src/components/sections/media/MediaPlayer.astro +2 -2
  19. package/template/src/components/sections/shared.ts +3 -0
  20. package/template/src/components/sections/text-image/definition.ts +1 -1
  21. package/template/src/content.config.ts +4 -2
  22. package/template/src/dev/section-preview.astro +53 -0
  23. package/template/src/env.d.ts +2 -0
  24. package/template/src/layouts/Base.astro +19 -12
  25. package/template/src/lib/content.ts +57 -2
  26. package/template/src/lib/editing.ts +6 -0
  27. package/template/src/lib/sitemap.ts +14 -2
  28. package/template/src/pages/[...slug].astro +30 -16
  29. package/template/src/components/sections/contact/Contact.astro +0 -231
  30. package/template/src/components/sections/contact/Contact.stories.ts +0 -16
  31. package/template/src/components/sections/contact/definition.ts +0 -52
  32. package/template/src/components/sections/contact/form.ts +0 -313
  33. package/template/src/components/sections/contact/wireframe.ts +0 -15
  34. package/template/src/components/sections/logo-strip/LogoStrip.astro +0 -110
  35. package/template/src/components/sections/logo-strip/LogoStrip.stories.ts +0 -20
  36. package/template/src/components/sections/logo-strip/definition.ts +0 -30
  37. package/template/src/components/sections/logo-strip/wireframe.ts +0 -11
  38. package/template/src/components/sections/pricing/Pricing.astro +0 -210
  39. package/template/src/components/sections/pricing/Pricing.stories.ts +0 -16
  40. package/template/src/components/sections/pricing/definition.ts +0 -62
  41. package/template/src/components/sections/pricing/wireframe.ts +0 -18
  42. package/template/src/components/sections/stats/Stats.astro +0 -110
  43. package/template/src/components/sections/stats/Stats.stories.ts +0 -16
  44. package/template/src/components/sections/stats/definition.ts +0 -41
  45. package/template/src/components/sections/stats/wireframe.ts +0 -15
  46. package/template/src/components/sections/testimonials/Testimonials.astro +0 -172
  47. package/template/src/components/sections/testimonials/Testimonials.stories.ts +0 -19
  48. package/template/src/components/sections/testimonials/definition.ts +0 -42
  49. package/template/src/components/sections/testimonials/wireframe.ts +0 -21
  50. package/template/src/lib/contact-form.ts +0 -97
  51. package/template/src/lib/hidden-text.ts +0 -32
@@ -35,42 +35,6 @@
35
35
  "type": "hero",
36
36
  "variant": "split"
37
37
  },
38
- {
39
- "anchor": "logos",
40
- "id": "logos",
41
- "props": {
42
- "label": "Trusted by teams like yours",
43
- "logos": [
44
- {
45
- "alt": "Partner logo 1",
46
- "src": "placeholder"
47
- },
48
- {
49
- "alt": "Partner logo 2",
50
- "src": "placeholder"
51
- },
52
- {
53
- "alt": "Partner logo 3",
54
- "src": "placeholder"
55
- },
56
- {
57
- "alt": "Partner logo 4",
58
- "src": "placeholder"
59
- },
60
- {
61
- "alt": "Partner logo 5",
62
- "src": "placeholder"
63
- },
64
- {
65
- "alt": "Partner logo 6",
66
- "src": "placeholder"
67
- }
68
- ]
69
- },
70
- "tone": "base",
71
- "type": "logoStrip",
72
- "variant": "marquee"
73
- },
74
38
  {
75
39
  "anchor": "features",
76
40
  "id": "features",
@@ -163,178 +127,41 @@
163
127
  "variant": "right"
164
128
  },
165
129
  {
166
- "anchor": "stats",
167
- "id": "stats",
130
+ "id": "getting-started",
168
131
  "props": {
169
- "body": "Pick three or four numbers you can stand behind, and say in a few words what each one counts.",
170
- "eyebrow": "By the numbers",
171
- "heading": "Figures that build trust.",
172
- "items": [
173
- {
174
- "label": "customers since launch",
175
- "value": "120+"
176
- },
177
- {
178
- "label": "would recommend us",
179
- "value": "98%"
180
- },
181
- {
182
- "label": "average reply time",
183
- "value": "24 h"
184
- },
185
- {
186
- "label": "in business",
187
- "value": "10 yrs"
188
- }
189
- ],
132
+ "body": "Say what the reader does first, then what happens next. Keep each step to one sentence.",
133
+ "eyebrow": "Getting started",
134
+ "heading": "Three steps to get going.",
190
135
  "marks": [
191
136
  {
192
137
  "end": 25,
193
138
  "font": "serif",
194
139
  "italic": true,
195
- "start": 13
196
- }
197
- ]
198
- },
199
- "tone": "inverse",
200
- "type": "stats",
201
- "variant": "row"
202
- },
203
- {
204
- "anchor": "testimonials",
205
- "id": "testimonials",
206
- "props": {
207
- "eyebrow": "Testimonials",
208
- "heading": "What people say",
209
- "items": [
210
- {
211
- "name": "Alex Morgan",
212
- "quote": "A short quote from a happy customer. One or two sentences that sound like a real person.",
213
- "role": "Role, Company"
214
- },
215
- {
216
- "name": "Sam Rivera",
217
- "quote": "Quotes work best when they name a specific result, not just a compliment.",
218
- "role": "Role, Company"
219
- },
220
- {
221
- "name": "Jordan Lee",
222
- "quote": "Ask for permission before you publish a name, and add a photo if you have one.",
223
- "role": "Role, Company"
224
- }
225
- ],
226
- "marks": [
227
- {
228
- "end": 15,
229
- "font": "serif",
230
- "italic": true,
231
- "start": 5
232
- }
233
- ]
234
- },
235
- "tone": "base",
236
- "type": "testimonials",
237
- "variant": "carousel"
238
- },
239
- {
240
- "anchor": "pricing",
241
- "id": "pricing",
242
- "props": {
243
- "eyebrow": "Pricing",
244
- "heading": "Simple plans, no surprises.",
245
- "intro": "Say what every plan includes, then let the table below cover the differences.",
246
- "marks": [
247
- {
248
- "end": 27,
249
- "font": "serif",
250
- "italic": true,
251
- "start": 14
140
+ "start": 15
252
141
  }
253
142
  ],
254
- "plans": [
143
+ "numbered": true,
144
+ "steps": [
255
145
  {
256
- "blurb": "For trying things out.",
257
- "cta": {
258
- "href": "#contact",
259
- "label": "Start free"
260
- },
261
- "features": [
262
- "Core features",
263
- "One project",
264
- "Community support"
265
- ],
266
- "monthly": 0,
267
- "name": "Starter"
146
+ "description": "Name the first thing the reader does.",
147
+ "icon": "cursor",
148
+ "title": "Pick"
268
149
  },
269
150
  {
270
- "blurb": "For growing teams.",
271
- "cta": {
272
- "href": "#contact",
273
- "label": "Choose Pro"
274
- },
275
- "featured": true,
276
- "features": [
277
- "Everything in Starter",
278
- "Unlimited projects",
279
- "Priority email support",
280
- "Team members"
281
- ],
282
- "monthly": 19,
283
- "name": "Pro"
151
+ "description": "Say what they change or decide next.",
152
+ "icon": "edit",
153
+ "title": "Shape"
284
154
  },
285
155
  {
286
- "blurb": "For larger organisations.",
287
- "cta": {
288
- "href": "#contact",
289
- "label": "Contact sales"
290
- },
291
- "features": [
292
- "Everything in Pro",
293
- "Custom onboarding",
294
- "Dedicated contact"
295
- ],
296
- "monthly": 49,
297
- "name": "Business"
156
+ "description": "End with what they have when they finish.",
157
+ "icon": "check",
158
+ "title": "Done"
298
159
  }
299
- ],
300
- "rows": [
301
- [
302
- "Core features",
303
- true,
304
- true,
305
- true
306
- ],
307
- [
308
- "Projects",
309
- "1",
310
- "Unlimited",
311
- "Unlimited"
312
- ],
313
- [
314
- "Team members",
315
- false,
316
- true,
317
- true
318
- ],
319
- [
320
- "Custom onboarding",
321
- false,
322
- false,
323
- true
324
- ],
325
- [
326
- "Support",
327
- "Community",
328
- "Email",
329
- "Dedicated"
330
- ]
331
- ],
332
- "singleHeading": "One plan with everything included.",
333
- "yearlyDiscount": 0.2
160
+ ]
334
161
  },
335
- "tone": "subtle",
336
- "type": "pricing",
337
- "variant": "tiers"
162
+ "tone": "inverse",
163
+ "type": "steps",
164
+ "variant": "columns"
338
165
  },
339
166
  {
340
167
  "anchor": "faq",
@@ -369,7 +196,7 @@
369
196
  }
370
197
  ],
371
198
  "link": {
372
- "href": "#contact",
199
+ "href": "mailto:hello@example.com",
373
200
  "label": "Contact us"
374
201
  },
375
202
  "marks": [
@@ -380,7 +207,7 @@
380
207
  "start": 11
381
208
  }
382
209
  ],
383
- "more": "Still have a question? The contact section below reaches a person."
210
+ "more": "Still have a question? Write to us and a person answers."
384
211
  },
385
212
  "tone": "base",
386
213
  "type": "faq",
@@ -401,7 +228,7 @@
401
228
  }
402
229
  ],
403
230
  "primary": {
404
- "href": "#contact",
231
+ "href": "mailto:hello@example.com",
405
232
  "label": "Primary action"
406
233
  },
407
234
  "secondary": {
@@ -412,47 +239,6 @@
412
239
  "tone": "base",
413
240
  "type": "cta",
414
241
  "variant": "band"
415
- },
416
- {
417
- "anchor": "contact",
418
- "id": "contact",
419
- "props": {
420
- "body": "Tell people what they can contact you about and when they will hear back.",
421
- "details": [
422
- {
423
- "label": "Email",
424
- "value": "hello@example.com"
425
- },
426
- {
427
- "label": "Phone",
428
- "value": "+1 555 010 0100"
429
- },
430
- {
431
- "label": "Hours",
432
- "value": "Monday to Friday, 9:00 to 17:00"
433
- }
434
- ],
435
- "eyebrow": "Contact",
436
- "heading": "Get in touch.",
437
- "marks": [
438
- {
439
- "end": 13,
440
- "font": "serif",
441
- "italic": true,
442
- "start": 4
443
- }
444
- ],
445
- "note": "We only use your details to reply to you.",
446
- "thanks": "Thanks, your message is on its way. We will reply within two working days.",
447
- "topics": [
448
- "General",
449
- "Sales",
450
- "Support"
451
- ]
452
- },
453
- "tone": "subtle",
454
- "type": "contact",
455
- "variant": "split"
456
242
  }
457
243
  ],
458
244
  "seo": {
@@ -17,10 +17,6 @@
17
17
  "href": "/#features",
18
18
  "label": "Features"
19
19
  },
20
- {
21
- "href": "/#pricing",
22
- "label": "Pricing"
23
- },
24
20
  {
25
21
  "href": "/#faq",
26
22
  "label": "FAQ"
@@ -35,7 +31,7 @@
35
31
  "label": "About"
36
32
  },
37
33
  {
38
- "href": "/#contact",
34
+ "href": "mailto:hello@example.com",
39
35
  "label": "Contact"
40
36
  }
41
37
  ],
@@ -63,7 +59,7 @@
63
59
  "header": {
64
60
  "actions": [
65
61
  {
66
- "href": "/#contact",
62
+ "href": "/#cta",
67
63
  "label": "Get started"
68
64
  }
69
65
  ],
@@ -78,10 +74,6 @@
78
74
  "href": "/#features",
79
75
  "label": "Features"
80
76
  },
81
- {
82
- "href": "/#pricing",
83
- "label": "Pricing"
84
- },
85
77
  {
86
78
  "href": "/#faq",
87
79
  "label": "FAQ"
@@ -19,7 +19,7 @@
19
19
  "@fontsource/jetbrains-mono": "^5.3.0",
20
20
  "@tailwindcss/vite": "^4.1.12",
21
21
  "astro": "^7.4.1",
22
- "bearminion": "^1.20.0",
22
+ "bearminion": "^1.21.0",
23
23
  "class-variance-authority": "^0.7.1",
24
24
  "sharp": "^0.35.5",
25
25
  "tailwind-merge": "^3.7.0",
@@ -0,0 +1,83 @@
1
+ ---
2
+ import type { ListedEntry } from 'bearminion'
3
+ import Typography from '../atoms/Typography.astro'
4
+ import MediaFrame from '../molecules/MediaFrame.astro'
5
+
6
+ /**
7
+ * The entries of a content type on its listing page, one card each. It shows what an entry has: `date`, `excerpt`
8
+ * and `cover` when the type declares fields by those names, and the entry's SEO description when there is no excerpt.
9
+ * A type with other fields: change this file, it is yours.
10
+ */
11
+ interface Props {
12
+ entries: ListedEntry[]
13
+ /** Shown above the list when the listing page has no sections of its own to introduce it. */
14
+ heading?: string
15
+ /** The site's language, for the date. */
16
+ lang: string
17
+ }
18
+
19
+ const { entries, heading, lang } = Astro.props
20
+
21
+ const text = (value: unknown): string | undefined => (typeof value === 'string' && value !== '' ? value : undefined)
22
+
23
+ /** A cover is an image field (`{ src, alt }`) or a plain path. */
24
+ function coverOf(value: unknown): { src: string; alt: string } | undefined {
25
+ if (typeof value === 'string' && value !== '') return { src: value, alt: '' }
26
+ if (typeof value !== 'object' || value === null || !('src' in value) || typeof value.src !== 'string') return undefined
27
+ if ('hidden' in value && value.hidden === true) return undefined
28
+ return { src: value.src, alt: 'alt' in value && typeof value.alt === 'string' ? value.alt : '' }
29
+ }
30
+
31
+ /** `2026-01-05` as the site's language writes a date. Anything that is not a date is shown as it is. */
32
+ function dateOf(value: unknown): { iso: string; label: string } | undefined {
33
+ const raw = value instanceof Date ? value.toISOString() : text(value)
34
+ if (!raw) return undefined
35
+ const date = new Date(raw)
36
+ if (Number.isNaN(date.getTime())) return { iso: raw, label: raw }
37
+ return { iso: raw, label: new Intl.DateTimeFormat(lang, { dateStyle: 'long', timeZone: 'UTC' }).format(date) }
38
+ }
39
+
40
+ const cards = entries.map((entry) => ({
41
+ entry,
42
+ cover: coverOf(entry.fields.cover),
43
+ date: dateOf(entry.fields.date),
44
+ excerpt: text(entry.fields.excerpt) ?? text(entry.description),
45
+ }))
46
+ ---
47
+
48
+ <section data-entry-list class="relative overflow-clip">
49
+ <div class="section-container">
50
+ {heading && <Typography as="h1" size="h2">{heading}</Typography>}
51
+ {
52
+ cards.length === 0 ? (
53
+ <Typography as="p" size="lead" color="muted" class={heading ? 'mt-6' : undefined}>
54
+ Nothing here yet.
55
+ </Typography>
56
+ ) : (
57
+ <ul class:list={['grid grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-4', heading && 'mt-12']}>
58
+ {cards.map(({ entry, cover, date, excerpt }) => (
59
+ <li class="relative flex flex-col gap-4 rounded-card-lg bg-surface p-6 ring-line transition duration-200 hover:-translate-y-1 hover:shadow-[0_24px_40px_-28px_oklch(0.2_0.02_255/0.4)]">
60
+ {cover && <MediaFrame src={cover.src} alt={cover.alt} aspectClass="aspect-[16/9]" />}
61
+ {date && (
62
+ <p class="font-mono text-[0.6875rem] tracking-[0.08em] text-muted">
63
+ <time datetime={date.iso}>{date.label}</time>
64
+ </p>
65
+ )}
66
+ <Typography as="h2" size="h3">
67
+ {/* The link covers the whole card, so the title is the one thing a screen reader announces as the link. */}
68
+ <a href={entry.path} class="after:absolute after:inset-0 after:rounded-card-lg focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-accent">
69
+ {entry.title}
70
+ </a>
71
+ </Typography>
72
+ {excerpt && (
73
+ <Typography as="p" size="body" color="muted">
74
+ {excerpt}
75
+ </Typography>
76
+ )}
77
+ </li>
78
+ ))}
79
+ </ul>
80
+ )
81
+ }
82
+ </div>
83
+ </section>
@@ -0,0 +1,56 @@
1
+ ---
2
+ import type { Pagination } from 'bearminion'
3
+
4
+ /** The page numbers under a listing. Nothing is drawn while the listing fits on one page. */
5
+ interface Props {
6
+ pagination: Pagination
7
+ }
8
+
9
+ const { pagination } = Astro.props
10
+ const step = 'inline-flex h-10 min-w-10 items-center justify-center rounded-full px-3 font-mono text-sm ring-line transition-colors'
11
+ const link = `${step} bg-surface hover:text-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`
12
+ ---
13
+
14
+ {
15
+ pagination.pages > 1 && (
16
+ <nav aria-label="Pages" data-pagination class="mx-auto max-w-[80rem] px-[clamp(1.25rem,4cqi,3rem)] pb-16">
17
+ <ul class="flex flex-wrap items-center justify-center gap-2">
18
+ <li>
19
+ {pagination.previous ? (
20
+ <a href={pagination.previous} rel="prev" class={link}>
21
+ Previous
22
+ </a>
23
+ ) : (
24
+ <span aria-disabled="true" class={`${step} text-muted opacity-50`}>
25
+ Previous
26
+ </span>
27
+ )}
28
+ </li>
29
+ {pagination.links.map((item) => (
30
+ <li>
31
+ {item.current ? (
32
+ <span aria-current="page" class={`${step} bg-fg text-bg`}>
33
+ {item.page}
34
+ </span>
35
+ ) : (
36
+ <a href={item.path} aria-label={`Page ${item.page}`} class={link}>
37
+ {item.page}
38
+ </a>
39
+ )}
40
+ </li>
41
+ ))}
42
+ <li>
43
+ {pagination.next ? (
44
+ <a href={pagination.next} rel="next" class={link}>
45
+ Next
46
+ </a>
47
+ ) : (
48
+ <span aria-disabled="true" class={`${step} text-muted opacity-50`}>
49
+ Next
50
+ </span>
51
+ )}
52
+ </li>
53
+ </ul>
54
+ </nav>
55
+ )
56
+ }
@@ -1,34 +1,24 @@
1
1
  // Generated by `bearminion sync`. Do not edit: add or remove a directory under sections/ and run it again.
2
2
  import type { SectionType } from './definitions'
3
- import Contact from './contact/Contact.astro'
4
3
  import Cta from './cta/Cta.astro'
5
4
  import Faq from './faq/Faq.astro'
6
5
  import Features from './features/Features.astro'
7
6
  import Gallery from './gallery/Gallery.astro'
8
7
  import Hero from './hero/Hero.astro'
9
- import LogoStrip from './logo-strip/LogoStrip.astro'
10
8
  import Media from './media/Media.astro'
11
- import Pricing from './pricing/Pricing.astro'
12
- import Stats from './stats/Stats.astro'
13
9
  import Steps from './steps/Steps.astro'
14
- import Testimonials from './testimonials/Testimonials.astro'
15
10
  import Text from './text/Text.astro'
16
11
  import TextImage from './text-image/TextImage.astro'
17
12
 
18
13
  /** Maps a content section `type` to the component that renders it. */
19
14
  export const sectionComponents = {
20
- contact: Contact,
21
15
  cta: Cta,
22
16
  faq: Faq,
23
17
  features: Features,
24
18
  gallery: Gallery,
25
19
  hero: Hero,
26
- logoStrip: LogoStrip,
27
20
  media: Media,
28
- pricing: Pricing,
29
- stats: Stats,
30
21
  steps: Steps,
31
- testimonials: Testimonials,
32
22
  text: Text,
33
23
  textImage: TextImage,
34
24
  } satisfies Record<SectionType, unknown>
@@ -1,33 +1,23 @@
1
1
  // Generated by `bearminion sync`. Do not edit: add or remove a directory under sections/ and run it again.
2
2
  import type { SectionRegistry } from 'bearminion'
3
- import { contact } from './contact/definition'
4
3
  import { cta } from './cta/definition'
5
4
  import { faq } from './faq/definition'
6
5
  import { features } from './features/definition'
7
6
  import { gallery } from './gallery/definition'
8
7
  import { hero } from './hero/definition'
9
- import { logoStrip } from './logo-strip/definition'
10
8
  import { media } from './media/definition'
11
- import { pricing } from './pricing/definition'
12
- import { stats } from './stats/definition'
13
9
  import { steps } from './steps/definition'
14
- import { testimonials } from './testimonials/definition'
15
10
  import { text } from './text/definition'
16
11
  import { textImage } from './text-image/definition'
17
12
 
18
13
  export const sectionDefinitions = {
19
- contact,
20
14
  cta,
21
15
  faq,
22
16
  features,
23
17
  gallery,
24
18
  hero,
25
- logoStrip,
26
19
  media,
27
- pricing,
28
- stats,
29
20
  steps,
30
- testimonials,
31
21
  text,
32
22
  textImage,
33
23
  } satisfies SectionRegistry
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
  import { defineSection, linkSchema, richTextSchema, textSchema, withEmphasis, type CountRule } from 'bearminion'
3
- import { DEFAULT_CONTACT_ANCHOR, accent, eyebrow, heading } from '../shared'
3
+ import { DEFAULT_CONTACT_HREF, accent, eyebrow, heading } from '../shared'
4
4
  import { faqWireframe } from './wireframe'
5
5
 
6
6
  export const faqVariants = ['accordion', 'split', 'grid'] as const
@@ -38,7 +38,7 @@ export const faq = defineSection({
38
38
  eyebrow: 'FAQ',
39
39
  heading: 'Questions, answered plainly.',
40
40
  marks: accent('Questions, answered plainly.', 'plainly.'),
41
- link: { label: 'Contact us', href: `#${DEFAULT_CONTACT_ANCHOR}` },
41
+ link: { label: 'Contact us', href: DEFAULT_CONTACT_HREF },
42
42
  items: [
43
43
  { q: 'What is included?', a: 'Answer the question people ask most before they buy, in two or three sentences.' },
44
44
  { q: 'How long does it take to get started?', a: 'Give a realistic time frame and say what the reader needs to have ready.' },
@@ -4,7 +4,7 @@ import Typography from '../../atoms/Typography.astro'
4
4
  import SectionHeader from '../../molecules/SectionHeader.astro'
5
5
  import SectionShell from '../../molecules/SectionShell.astro'
6
6
  import MediaPlayer from './MediaPlayer.astro'
7
- import { editing } from '../../../lib/editing'
7
+ import { placeholders } from '../../../lib/editing'
8
8
  import { parseMediaSource } from './source'
9
9
 
10
10
  interface Props {
@@ -20,7 +20,7 @@ const reveal = section.motion ?? motion
20
20
  const intro = props.intro && Boolean(props.eyebrow || props.heading || props.body)
21
21
  const filled = props.kind === 'video' ? Boolean(props.video && parseMediaSource(props.video)) : Boolean(props.image?.src && props.image.src !== 'placeholder' && !props.image.hidden)
22
22
  // A built site leaves out an empty frame, and with no heading either, the whole section.
23
- const showFrame = filled || editing
23
+ const showFrame = filled || placeholders
24
24
  const rendered = showFrame || intro
25
25
  const player = {
26
26
  kind: props.kind,
@@ -2,7 +2,7 @@
2
2
  import type { Image } from 'bearminion'
3
3
  import { imageSrcset, imageUrl } from '../../../lib/image-url'
4
4
  import { cn } from '../../../lib/cn'
5
- import { editing } from '../../../lib/editing'
5
+ import { placeholders } from '../../../lib/editing'
6
6
  import MediaFrame from '../../molecules/MediaFrame.astro'
7
7
  import type { MediaProps } from './definition'
8
8
  import { parseMediaSource } from './source'
@@ -45,7 +45,7 @@ const looping = source?.kind === 'file' && playback === 'loop'
45
45
  {
46
46
  empty ? (
47
47
  // The empty frame is an editor hint, so a built site leaves it out.
48
- editing && (
48
+ placeholders && (
49
49
  <div class={cn(frame, 'placeholder-stripes flex flex-col items-center justify-center gap-4 p-6 text-center')} data-field={kind === 'image' ? imageField : undefined}>
50
50
  {kind === 'video' && (
51
51
  <span class="flex size-14 items-center justify-center rounded-full bg-fg text-bg" aria-hidden="true">
@@ -11,3 +11,6 @@ export function accent(heading: string, em: string) {
11
11
 
12
12
  /** Default in-page target for contact CTAs. Sample pages set this anchor on the contact section. */
13
13
  export const DEFAULT_CONTACT_ANCHOR = 'contact'
14
+
15
+ /** Where a "Contact us" link points by default on a site that may have no Contact section: an address to replace. */
16
+ export const DEFAULT_CONTACT_HREF = 'mailto:hello@example.com'
@@ -27,7 +27,7 @@ export const textImage = defineSection({
27
27
  heading: 'Explain it in three steps.',
28
28
  marks: accent('Explain it in three steps.', 'three steps.'),
29
29
  body: 'A paragraph that walks through how it works, from the first contact to the result.',
30
- points: ['Step one: what happens first'],
30
+ points: ['Step one: what happens first', 'Step two: what you do for them', 'Step three: what they end up with'],
31
31
  link: { label: 'Learn more', href: '#' },
32
32
  image: { src: 'placeholder', alt: '' },
33
33
  },
@@ -5,9 +5,10 @@ import { contentModel } from './lib/content-model'
5
5
 
6
6
  /**
7
7
  * `pages` (id = slug) and `site` (id `site`) read from `content/`. The editor writes the same
8
- * files, and Astro refreshes these collections when they change.
8
+ * files, and Astro refreshes these collections when they change. `types` holds one more collection for each content
9
+ * type declared in `content-model.ts`, and is empty when there are none.
9
10
  */
10
- const { pages, site } = contentCollections(contentModel, {
11
+ const { pages, site, types } = contentCollections(contentModel, {
11
12
  contentDir: contentDirectory(),
12
13
  // Dev only: a page holding a section type the site dropped still loads, so the editor can remove it.
13
14
  tolerateOrphans: import.meta.env.DEV,
@@ -16,4 +17,5 @@ const { pages, site } = contentCollections(contentModel, {
16
17
  export const collections = {
17
18
  pages: defineCollection(pages),
18
19
  site: defineCollection(site),
20
+ ...Object.fromEntries(Object.entries(types).map(([name, collection]) => [name, defineCollection(collection)])),
19
21
  }