ferst-core 0.15.0 → 0.17.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.
- package/NOTICE +63 -31
- package/README.md +13 -4
- package/bin/ferst-media.mjs +96 -0
- package/bin/ferst-modules.mjs +17 -2
- package/components/BlockRenderer.astro +131 -129
- package/components/Card.astro +53 -51
- package/components/MembersAccount.astro +370 -0
- package/components/PostCard.astro +138 -136
- package/components/SiteHeader.astro +32 -14
- package/components/blocks/Grid.astro +49 -48
- package/components/blocks/Heading.astro +4 -1
- package/components/islands/BookMonth.tsx +95 -0
- package/components/islands/MembersAccount.tsx +392 -0
- package/components/recipes/Banner.astro +146 -146
- package/components/recipes/Book.astro +1147 -926
- package/components/recipes/FeatureCards.astro +112 -118
- package/components/recipes/Gallery.astro +57 -59
- package/components/recipes/Hero.astro +112 -10
- package/components/recipes/LatestPosts.astro +295 -292
- package/components/recipes/Locations.astro +146 -143
- package/components/recipes/Marquee.astro +75 -75
- package/components/recipes/MediaCards.astro +213 -219
- package/components/recipes/MembersContent.astro +176 -0
- package/components/recipes/Pricing.astro +149 -150
- package/components/recipes/Stats.astro +150 -157
- package/components/recipes/Tiles.astro +342 -296
- package/content/blocks.ts +1091 -1024
- package/content/cookies.ts +14 -0
- package/content/imageSlots.mjs +542 -0
- package/content/recipe-questions.ts +81 -80
- package/content/schemas.ts +13 -11
- package/examples/recipes.ts +5 -0
- package/fonts/OFL.txt +1332 -287
- package/fonts/anton-latin-400-normal.woff2 +0 -0
- package/fonts/bangers-latin-400-normal.woff2 +0 -0
- package/fonts/bebas-neue-latin-400-normal.woff2 +0 -0
- package/fonts/bowlby-one-latin-400-normal.woff2 +0 -0
- package/fonts/fredoka-latin-400-normal.woff2 +0 -0
- package/fonts/fredoka-latin-600-normal.woff2 +0 -0
- package/fonts/fredoka-latin-700-normal.woff2 +0 -0
- package/fonts/knewave-latin-400-normal.woff2 +0 -0
- package/fonts/lora-latin-400-normal.woff2 +0 -0
- package/fonts/lora-latin-600-normal.woff2 +0 -0
- package/fonts/lora-latin-700-normal.woff2 +0 -0
- package/fonts/merriweather-latin-400-normal.woff2 +0 -0
- package/fonts/merriweather-latin-600-normal.woff2 +0 -0
- package/fonts/merriweather-latin-700-normal.woff2 +0 -0
- package/fonts/nunito-latin-400-normal.woff2 +0 -0
- package/fonts/nunito-latin-600-normal.woff2 +0 -0
- package/fonts/nunito-latin-700-normal.woff2 +0 -0
- package/fonts/oswald-latin-400-normal.woff2 +0 -0
- package/fonts/oswald-latin-600-normal.woff2 +0 -0
- package/fonts/oswald-latin-700-normal.woff2 +0 -0
- package/fonts/rubik-dirt-latin-400-normal.woff2 +0 -0
- package/integration.mjs +319 -263
- package/layouts/Base.astro +8 -16
- package/lib/book.ts +416 -378
- package/lib/fonts.ts +130 -0
- package/lib/gridRows.ts +197 -0
- package/lib/image-fields.ts +140 -0
- package/lib/image-size.mjs +108 -73
- package/lib/image-sizes.ts +16 -0
- package/lib/logo-header.ts +46 -0
- package/lib/media-check.mjs +524 -0
- package/lib/members-account.ts +276 -0
- package/lib/members.ts +115 -0
- package/lib/theme-preview.ts +203 -140
- package/lib/themeTokens.ts +235 -220
- package/package.json +80 -71
- package/routes/account.astro +16 -0
- package/routes/cookie-policy.astro +28 -28
- package/styles/fonts.css +239 -76
- package/styles/theme.css +228 -160
- package/lib/gridColumns.ts +0 -22
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Setup questions, kept with the recipes. When a client sets up a page from a design, each
|
|
3
|
-
* section of the design asks one free-flowing question; the answer is a paragraph in the client's
|
|
4
|
-
* own words, from which the section is filled. Deliberately not a field-by-field form: the
|
|
5
|
-
* recipe decides how the words are laid out, so the client only has to say what they mean.
|
|
6
|
-
*
|
|
7
|
-
* - `ask`: the question, a hint, and a plain name for the section.
|
|
8
|
-
* - `note`: the section fills itself (from the platform or the site), so nothing is asked.
|
|
9
|
-
* - `null`: spacing and layout pieces, which have no content of their own (containers are
|
|
10
|
-
* walked into by the caller).
|
|
11
|
-
*
|
|
12
|
-
* Generic wording only. How questions are ordered and combined into a request lives with the
|
|
13
|
-
* platform.
|
|
14
|
-
*/
|
|
15
|
-
export type RecipeQuestion =
|
|
16
|
-
| { kind: 'ask'; label: string; question: string; hint: string }
|
|
17
|
-
| { kind: 'note'; label: string; note: string };
|
|
18
|
-
|
|
19
|
-
const ask = (label: string, question: string, hint: string): RecipeQuestion => ({ kind: 'ask', label, question, hint });
|
|
20
|
-
const note = (label: string, text: string): RecipeQuestion => ({ kind: 'note', label, note: text });
|
|
21
|
-
|
|
22
|
-
const QUESTIONS: Record<string, RecipeQuestion | null> = {
|
|
23
|
-
// Recipes
|
|
24
|
-
hero: ask('Opening banner', 'What should the first thing visitors see say?', 'Your main message in your own words, a supporting line, and where the main button should take people.'),
|
|
25
|
-
featureCards: ask('Highlights', 'What are the main things you want to highlight here?', 'Describe each one in a sentence or two, and say where each should lead if people want more.'),
|
|
26
|
-
cta: ask('Call to action', 'What do you most want visitors to do next?', 'For example: book, call, visit, sign up. Say it the way you would to a customer.'),
|
|
27
|
-
faq: ask('Questions and answers', 'What do people often ask you, and how do you answer?', 'Write each question with your usual answer. As many as you like.'),
|
|
28
|
-
gallery: ask('Photo gallery', 'What should these photos show?', 'Describe the pictures you have or want: your work, your place, your people. You can upload them in the content editor.'),
|
|
29
|
-
testimonial: ask('What people say', 'What have customers said about you?', 'Paste a kind word or review, with the person’s name or initials if they’re happy to be named.'),
|
|
30
|
-
contactForm: ask('Contact form', 'What should people be able to ask you through this form?', 'Who answers, what you need to know from them, and how soon they can expect a reply.'),
|
|
31
|
-
form: note('Form', 'This shows one of your organisation’s forms. Choose or create it in the portal under Forms.'),
|
|
32
|
-
pay: note('Payment', 'This takes a payment for one of the things your sites take payment for. Set what it’s for and its price in the portal, under Payments.'),
|
|
33
|
-
book: note('Booking', 'This lets visitors book a time for one of your offers. Set the offer, who gives it and their opening hours in the portal, under Events and bookings.'),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Setup questions, kept with the recipes. When a client sets up a page from a design, each
|
|
3
|
+
* section of the design asks one free-flowing question; the answer is a paragraph in the client's
|
|
4
|
+
* own words, from which the section is filled. Deliberately not a field-by-field form: the
|
|
5
|
+
* recipe decides how the words are laid out, so the client only has to say what they mean.
|
|
6
|
+
*
|
|
7
|
+
* - `ask`: the question, a hint, and a plain name for the section.
|
|
8
|
+
* - `note`: the section fills itself (from the platform or the site), so nothing is asked.
|
|
9
|
+
* - `null`: spacing and layout pieces, which have no content of their own (containers are
|
|
10
|
+
* walked into by the caller).
|
|
11
|
+
*
|
|
12
|
+
* Generic wording only. How questions are ordered and combined into a request lives with the
|
|
13
|
+
* platform.
|
|
14
|
+
*/
|
|
15
|
+
export type RecipeQuestion =
|
|
16
|
+
| { kind: 'ask'; label: string; question: string; hint: string }
|
|
17
|
+
| { kind: 'note'; label: string; note: string };
|
|
18
|
+
|
|
19
|
+
const ask = (label: string, question: string, hint: string): RecipeQuestion => ({ kind: 'ask', label, question, hint });
|
|
20
|
+
const note = (label: string, text: string): RecipeQuestion => ({ kind: 'note', label, note: text });
|
|
21
|
+
|
|
22
|
+
const QUESTIONS: Record<string, RecipeQuestion | null> = {
|
|
23
|
+
// Recipes
|
|
24
|
+
hero: ask('Opening banner', 'What should the first thing visitors see say?', 'Your main message in your own words, a supporting line, and where the main button should take people.'),
|
|
25
|
+
featureCards: ask('Highlights', 'What are the main things you want to highlight here?', 'Describe each one in a sentence or two, and say where each should lead if people want more.'),
|
|
26
|
+
cta: ask('Call to action', 'What do you most want visitors to do next?', 'For example: book, call, visit, sign up. Say it the way you would to a customer.'),
|
|
27
|
+
faq: ask('Questions and answers', 'What do people often ask you, and how do you answer?', 'Write each question with your usual answer. As many as you like.'),
|
|
28
|
+
gallery: ask('Photo gallery', 'What should these photos show?', 'Describe the pictures you have or want: your work, your place, your people. You can upload them in the content editor.'),
|
|
29
|
+
testimonial: ask('What people say', 'What have customers said about you?', 'Paste a kind word or review, with the person’s name or initials if they’re happy to be named.'),
|
|
30
|
+
contactForm: ask('Contact form', 'What should people be able to ask you through this form?', 'Who answers, what you need to know from them, and how soon they can expect a reply.'),
|
|
31
|
+
form: note('Form', 'This shows one of your organisation’s forms. Choose or create it in the portal under Forms.'),
|
|
32
|
+
pay: note('Payment', 'This takes a payment for one of the things your sites take payment for. Set what it’s for and its price in the portal, under Payments.'),
|
|
33
|
+
book: note('Booking', 'This lets visitors book a time for one of your offers. Set the offer, who gives it and their opening hours in the portal, under Events and bookings.'),
|
|
34
|
+
membersContent: note('Members’ page', 'This shows one of your members’ pages to members who are signed in. Write it, and choose the sites it’s shown on, in the portal under Members.'),
|
|
35
|
+
accordion: ask('Expandable sections', 'What information should people be able to open up and read here?', 'Give each topic a short heading and the detail that goes under it.'),
|
|
36
|
+
tiles: ask('Quick links', 'Where do visitors most often want to go from here?', 'List the places or tasks, a few words each, for example: opening times, book now, prices.'),
|
|
37
|
+
banner: ask('Banner', 'What message deserves a bold band across the page?', 'A short statement or invitation, and where it should lead if anywhere.'),
|
|
38
|
+
stats: ask('Key numbers', 'Which numbers say something good about you?', 'Years running, people helped, places served: the number and what it means.'),
|
|
39
|
+
steps: ask('How it works', 'What are the steps someone goes through with you?', 'From first contact to finished, in your own words, in order.'),
|
|
40
|
+
pricing: ask('Prices', 'What do you charge, and what does each option include?', 'List each option with its price and what someone gets. Say if prices start “from”.'),
|
|
41
|
+
logos: ask('Logos', 'Whose logos should appear here?', 'Partners, accreditations or clients you are proud to show. You can upload the images in the content editor.'),
|
|
42
|
+
tabs: ask('Tabbed information', 'What information would people like to switch between here?', 'Name each topic and what it should say.'),
|
|
43
|
+
announcement: ask('Announcement', 'Is there a short announcement visitors should see?', 'One or two sentences: news, a change to times, an offer. Leave it blank if not.'),
|
|
44
|
+
bento: ask('Feature panels', 'What would you show off in a set of feature panels?', 'Your strongest points, products or moments, a sentence or two each.'),
|
|
45
|
+
marquee: ask('Scrolling line', 'What short words or phrases should scroll across here?', 'Things you offer, places you serve, or values, a few words each.'),
|
|
46
|
+
latestPosts: note('Latest posts', 'This shows your newest posts automatically. Write posts in the content editor.'),
|
|
47
|
+
mapEmbed: ask('Map', 'Where should the map show?', 'The address or place name, and anything about finding you or parking.'),
|
|
48
|
+
table: ask('Table', 'What information belongs in a table here?', 'Describe the rows and columns, or paste the details as you have them.'),
|
|
49
|
+
notice: ask('Notice', 'What notice should stand out on this page?', 'An important point people must not miss, in a sentence or two.'),
|
|
50
|
+
mediaCards: ask('Picture cards', 'What should each picture card show and say?', 'For each one: what the picture is, a short title and a line of text.'),
|
|
51
|
+
contactCard: ask('Contact details', 'How would you like people to reach you?', 'Phone, email, address and opening hours, as you want them shown.'),
|
|
52
|
+
locations: ask('Locations', 'Which places should be listed?', 'Each place with its address and anything visitors should know.'),
|
|
53
|
+
video: ask('Video', 'Which video should play here, and what is it about?', 'A link to the video (for example YouTube) and a line about it.'),
|
|
54
|
+
documents: ask('Documents', 'Which documents should people be able to open or download?', 'List each with a short description. You can upload the files in the content editor.'),
|
|
55
|
+
linkRow: ask('Links', 'Which links should sit together here?', 'Each link’s words and where it goes.'),
|
|
56
|
+
document: ask('Document', 'Which document should be shown here?', 'What it is and who it is for. You can upload the file in the content editor.'),
|
|
57
|
+
timetable: ask('Timetable', 'What happens when?', 'The days and times, and what is on at each. Say if it changes through the year.'),
|
|
58
|
+
contacts: ask('People to contact', 'Who should people contact, and about what?', 'Each person or role, what they help with, and how to reach them.'),
|
|
59
|
+
mediaText: ask('Picture with text', 'What should this picture and its words tell people?', 'Describe the picture and write the words that go beside it.'),
|
|
60
|
+
// Leaves and primitives
|
|
61
|
+
heading: ask('Heading', 'What should this heading say?', 'A few words that introduce what comes next.'),
|
|
62
|
+
prose: ask('Text', 'What should this text say?', 'Write it as you would explain it to a visitor. The more you give, the better the result.'),
|
|
63
|
+
image: ask('Picture', 'What should this picture show?', 'Describe it, or say which of your photos to use. You can upload it in the content editor.'),
|
|
64
|
+
button: ask('Button', 'What should this button say, and where should it take people?', 'A few words for the button and the page or address it opens.'),
|
|
65
|
+
quote: ask('Quote', 'What quote belongs here, and who said it?', 'The words and the person, if they are happy to be named.'),
|
|
66
|
+
list: ask('List', 'What should this list contain?', 'One item per line, in the order you want them.'),
|
|
67
|
+
stat: ask('Number', 'Which number should stand out here, and what does it mean?', 'The figure and a few words about it.'),
|
|
68
|
+
badge: ask('Label', 'What short label belongs here?', 'One to three words, for example: New, Open now, Since 1998.'),
|
|
69
|
+
divider: null,
|
|
70
|
+
spacer: null,
|
|
71
|
+
section: null,
|
|
72
|
+
grid: null,
|
|
73
|
+
stack: null,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const GENERAL = ask('Section', 'What should this section say?', 'Describe what it is for and the words you want in it.');
|
|
77
|
+
|
|
78
|
+
/** The setup question for a block type; `null` for spacing and layout pieces. */
|
|
79
|
+
export function recipeQuestion(type: string): RecipeQuestion | null {
|
|
80
|
+
return type in QUESTIONS ? QUESTIONS[type] : GENERAL;
|
|
81
|
+
}
|
package/content/schemas.ts
CHANGED
|
@@ -149,6 +149,10 @@ export const footerSettingsSchema = z.object({
|
|
|
149
149
|
.default([]),
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
+
/** The finishes a theme can give its display titles (`themeSettings.titleEffect`). */
|
|
153
|
+
export const TITLE_EFFECTS = ['none', 'stroke', 'shadow', 'glow'] as const;
|
|
154
|
+
export type TitleEffect = (typeof TITLE_EFFECTS)[number];
|
|
155
|
+
|
|
152
156
|
/**
|
|
153
157
|
* The brand — a client's design tokens, set in the CMS. The whole system is
|
|
154
158
|
* built to derive from just THREE source colours: `brand` (interactive accent),
|
|
@@ -164,7 +168,7 @@ export const footerSettingsSchema = z.object({
|
|
|
164
168
|
* the CMS), never baked into the shared core.
|
|
165
169
|
*
|
|
166
170
|
* This shape is what the Sveltia token pane edits (apps/showcase/public/admin):
|
|
167
|
-
* a client picks three colours + a font pairing +
|
|
171
|
+
* a client picks three colours + a font pairing + a few knobs, not 40 tokens.
|
|
168
172
|
*/
|
|
169
173
|
export const themeSettingsSchema = z.object({
|
|
170
174
|
/** Interactive accent — buttons, links, icons, highlights. Blank ⇒ neutral. */
|
|
@@ -173,7 +177,9 @@ export const themeSettingsSchema = z.object({
|
|
|
173
177
|
ink: z.string().default(''),
|
|
174
178
|
/** Background — page, cards, sections (tints derived from it). Blank ⇒ neutral. */
|
|
175
179
|
surface: z.string().default(''),
|
|
176
|
-
/** Site-wide font pairing (role → CSS font-family stack). Blank ⇒ core default.
|
|
180
|
+
/** Site-wide font pairing (role → CSS font-family stack). Blank ⇒ core default. The
|
|
181
|
+
* stacks a picker offers, grouped by mood and limited to the roles each face suits,
|
|
182
|
+
* are the curated list in lib/fonts.ts; any other stack is kept as the site's own. */
|
|
177
183
|
fonts: z
|
|
178
184
|
.object({
|
|
179
185
|
heading: z.string().default(''),
|
|
@@ -189,6 +195,11 @@ export const themeSettingsSchema = z.object({
|
|
|
189
195
|
stroke: z.enum(['on', 'off']).default('on'),
|
|
190
196
|
/** Input treatment — a single site-wide choice (a `data-field` attr on <html>). */
|
|
191
197
|
fields: z.enum(['boxed', 'filled', 'underline']).default('boxed'),
|
|
198
|
+
/** A finish on the display titles (the opener's title, a banner's title, the marquee),
|
|
199
|
+
* one site-wide choice (a `data-title-effect` attr on <html>): an outline, a hard
|
|
200
|
+
* poster shadow or a soft glow, in the brand colour. Always extra to the text's own
|
|
201
|
+
* contrast, never instead of it, and never animated. */
|
|
202
|
+
titleEffect: z.enum(TITLE_EFFECTS).default('none'),
|
|
192
203
|
/** Dark-mode formula knobs (root-derivation model). `darkDepth` = how light the
|
|
193
204
|
* dark page background sits (OKLCH L); `darkChroma` = the cap on how much colour
|
|
194
205
|
* the dark ground may carry. Both feed the AUTOMATIC dark roots. */
|
|
@@ -217,15 +228,6 @@ export const themeSettingsSchema = z.object({
|
|
|
217
228
|
export type SiteSettings = z.infer<typeof siteSettingsSchema>;
|
|
218
229
|
export type LogoSettings = z.infer<typeof logoSettingsSchema>;
|
|
219
230
|
export type LogoHeader = z.infer<typeof logoHeaderSchema>;
|
|
220
|
-
/** One page's header logo in place of the site's (a preview or a test fixture). `width` and
|
|
221
|
-
* `height` are the image's own, so its box is reserved before it loads. */
|
|
222
|
-
export interface HeaderLogoOverride {
|
|
223
|
-
light: string;
|
|
224
|
-
dark?: string;
|
|
225
|
-
width?: number;
|
|
226
|
-
height?: number;
|
|
227
|
-
header?: z.input<typeof logoHeaderSchema>;
|
|
228
|
-
}
|
|
229
231
|
export type NavbarSettings = z.infer<typeof navbarSettingsSchema>;
|
|
230
232
|
export type FooterSettings = z.infer<typeof footerSettingsSchema>;
|
|
231
233
|
export type ThemeSettings = z.infer<typeof themeSettingsSchema>;
|
package/examples/recipes.ts
CHANGED
|
@@ -5,17 +5,22 @@ export const recipes: GalleryEntry[] = [
|
|
|
5
5
|
{ type: 'hero', description: 'Page-opening band — split preset (text beside image).', block: { type: 'hero', title: 'Hero (split)', subtitle: 'Text beside an image.', cta: { label: 'Primary action', href: '#' }, image: { src: '/placeholder.svg', alt: 'Placeholder' }, layout: 'split' } },
|
|
6
6
|
{ type: 'hero', description: 'Media preset with a slow crossfade through several images — pauses off-screen, has a pause button, and stays on the first image under reduced motion. A single image is a still background; a `video` loops instead (and `size: "screen"` fills the first screen, edge to edge).', block: { type: 'hero', eyebrow: 'Welcome', title: 'Hero (media, rotating images)', subtitle: 'Text over a background that changes slowly.', cta: { label: 'Primary action', href: '#' }, layout: 'media', size: 'tall', media: { images: ['/showcase-hero.svg', '/placeholder.svg'], overlay: 45 } } },
|
|
7
7
|
{ type: 'hero', description: 'Media preset looping a YouTube (or Vimeo) video behind the text: paste the ordinary link as `video`. Until the visitor accepts cookies it shows the `poster` still and links to the video; then the muted, chromeless loop fades in, with a pause button. Reduced motion keeps the still.', block: { type: 'hero', title: 'Hero (media, YouTube background)', subtitle: 'A video opener without hosting the file yourself.', layout: 'media', size: 'tall', media: { video: 'https://youtu.be/aqz-KE-bpKQ', poster: '/showcase-hero.svg', overlay: 50 } } },
|
|
8
|
+
{ type: 'hero', description: 'A title set as a picture (`titleImage`): a designed wordmark, ideally transparent, drawn inside the page’s h1 in place of the title text. The `title` describes it, so screen readers and search engines still read the name. `width` small / medium / large (about 320 / 520 / 760px, capped to the screen on phones, never cropped); `shadow` keeps light lettering readable over a photo. Works in every layout.', block: { type: 'hero', eyebrow: 'Sea kayaking and coasteering', title: 'Tideline Outdoors', titleImage: { src: '/wordmark.svg', width: 'medium', shadow: true }, subtitle: 'The wordmark is the title.', cta: { label: 'Primary action', href: '#' }, layout: 'media', media: { image: '/showcase-hero.svg', overlay: 40 } } },
|
|
9
|
+
{ type: 'hero', description: 'A designed poster shown whole (`media.fit: "contain"`): never cropped, at its own shape, edge to edge with `size: "screen"` or `fullBleed`, the band as tall as the picture. No scrim; the words sit below the picture. `titleHidden` keeps the title as the page’s h1 for screen readers and search engines without showing it, since the poster already carries the name.', block: { type: 'hero', title: 'Harbour Adventures', titleHidden: true, subtitle: 'The poster carries the name; the words sit below it.', cta: { label: 'Primary action', href: '#' }, layout: 'media', media: { image: '/poster.svg', fit: 'contain' } } },
|
|
8
10
|
{ type: 'featureCards', description: 'An optional header over a responsive grid of icon + title + text cards.', block: { type: 'featureCards', title: 'Feature cards', columns: 3, cards: [{ icon: 'book-open', title: 'First feature', text: 'A short description.' }, { icon: 'shield', title: 'Second feature', text: 'A short description.' }, { icon: 'sparkle', title: 'Third feature', text: 'A short description.' }] } },
|
|
11
|
+
{ type: 'featureCards', description: 'Any count lays out neatly, with nothing to set: every grid of cards, tiles or numbers plans its rows per screen width (lib/gridRows). Never more to a row than the block’s columns or than stay readable; even rows only by using fewer columns; otherwise the full rows stay full and the last row is tidied: it spreads across the width (here 4 + 3), or, when that would stretch it, sits centred at the same width. `lastRow: "fill" | "center"` overrides that.', block: { type: 'featureCards', title: 'Seven cards, four to a row', columns: 4, cards: [{ icon: 'book-open', title: 'Plan', text: 'A short description.' }, { icon: 'shield', title: 'Protect', text: 'A short description.' }, { icon: 'sparkle', title: 'Polish', text: 'A short description.' }, { icon: 'heart', title: 'Care', text: 'A short description.' }, { icon: 'people', title: 'Gather', text: 'A short description.' }, { icon: 'gift', title: 'Give', text: 'A short description.' }, { icon: 'calendar', title: 'Schedule', text: 'A short description.' }] } },
|
|
9
12
|
{ type: 'cta', description: 'A centred call-to-action band (heading + text + button).', block: { type: 'cta', title: 'Ready to start?', text: 'A closing nudge with a single, clear action.', cta: { label: 'Get in touch', href: '#' }, background: 'accent' } },
|
|
10
13
|
{ type: 'faq', description: 'Expandable question / answer list — native, accessible, no JavaScript.', block: { type: 'faq', title: 'Frequently asked', items: [{ question: 'How are pages built?', answer: 'From a curated set of blocks, composed into your pages and verified before they go live — see the [architecture notes](https://example.com/architecture).' }, { question: 'Can I use my own brand?', answer: 'Yes — colours and fonts are your config; the core is brand-agnostic.' }] } },
|
|
11
14
|
{ type: 'gallery', description: 'A responsive grid of images with optional captions.', block: { type: 'gallery', columns: 3, images: [{ src: '/placeholder.svg', alt: 'One', caption: 'One' }, { src: '/placeholder.svg', alt: 'Two', caption: 'Two' }, { src: '/placeholder.svg', alt: 'Three', caption: 'Three' }] } },
|
|
12
15
|
{ type: 'testimonial', description: 'A centred quotation with author, role and an optional avatar.', block: { type: 'testimonial', quote: 'The showcase made the whole model click in a minute.', author: 'A. Client', role: 'Parish administrator' } },
|
|
13
16
|
{ type: 'contactForm', description: 'An accessible contact form in a centred column — labelled fields, a submit and an optional note. Fields are generic, so it also serves enquiry / sign-up forms.', block: { type: 'contactForm', title: 'Send us a message', intro: 'We usually reply within a day.', note: 'Demo form — the showcase has no backend; a real client points its action at their own endpoint.' } },
|
|
17
|
+
{ type: 'membersContent', description: 'A members’ page from the Members module, written in the portal and read only by the organisation’s signed-in members. The build holds a placeholder, never the words: the visitor’s browser asks the site (`/ferst-api/members/pages/<id>`) and the platform decides. Signed out, it offers “Sign in”; someone whose membership doesn’t include it is told so. The showcase has no members service, so here it says it can’t be shown (on your own computer: that sign-in works on the published site).', block: { type: 'membersContent', page: 'mpg_000000000000000000000000', title: 'For members' } },
|
|
14
18
|
{ type: 'accordion', description: 'Generic expand/collapse rows (title + body) — native, accessible, no JavaScript. FAQ’s domain-free sibling.', block: { type: 'accordion', title: 'How it works', items: [{ heading: 'Composable', body: 'Pages are ordered blocks stored as JSON.' }, { heading: 'Consistent', body: 'Recipes lock a good layout so quality can’t drift.' }] } },
|
|
15
19
|
{ type: 'tiles', description: 'A card grid with five looks — here “elevated” (soft shadow, lifts on hover) with the optional pointer-following spotlight. Radius / stroke / elevation come from the global surface tokens.', block: { type: 'tiles', variant: 'elevated', columns: 3, spotlight: true, tiles: [{ icon: 'sparkle', eyebrow: 'Level 1', title: 'Primitives', text: 'The raw ingredients.', href: '#' }, { icon: 'book-open', eyebrow: 'Level 2', title: 'Recipes', text: 'Curated compositions.', href: '#' }, { icon: 'shield', eyebrow: 'Level 3', title: 'Templates', text: 'Whole pages.', href: '#' }] } },
|
|
16
20
|
{ type: 'tiles', description: 'The “gradient” variant — brand → a derived accent-2 (an OKLCH hue-shift of your one brand colour), light text.', block: { type: 'tiles', variant: 'gradient', columns: 3, tiles: [{ icon: 'flame', title: 'Vibrant', text: 'One brand colour, a harmonious gradient.' }, { icon: 'sparkle', title: 'Derived', text: 'Accent-2 is computed, not configured.' }, { icon: 'heart', title: 'On-brand', text: 'Always harmonises with your hue.' }] } },
|
|
17
21
|
{ type: 'tiles', description: 'The “image” variant — a full-bleed photo with a legibility scrim and light text; the whole tile links.', block: { type: 'tiles', variant: 'image', columns: 3, tiles: [{ eyebrow: 'Feature', title: 'Photo tile', text: 'Text stays legible over any image.', href: '#', image: { src: '/placeholder.svg', alt: 'Placeholder' } }, { title: 'Second', text: 'Cover-fit background.', href: '#', image: { src: '/placeholder.svg', alt: 'Placeholder' } }, { title: 'Third', text: 'With a gradient scrim.', href: '#', image: { src: '/placeholder.svg', alt: 'Placeholder' } }] } },
|
|
18
22
|
{ type: 'tiles', description: 'Picture tiles — the “image” variant with no words: the picture alone is the tile (and the button, when it links), shown whole whatever its shape (a poster, a wide logo, a badge), named by its alt text. Mix with worded tiles; `linkLabel` sets the cue.', block: { type: 'tiles', variant: 'image', columns: 3, tiles: [{ href: '#', image: { src: '/placeholder.svg', alt: 'Summer fair poster — details' } }, { href: '#', image: { src: '/logos/acme.svg', alt: 'Acme — our partner' } }, { title: 'Newsletters', text: 'Every issue, newest first.', href: '#', linkLabel: 'Read them', image: { src: '/placeholder.svg', alt: '' } }] } },
|
|
23
|
+
{ type: 'tiles', description: 'Picture tiles edge to edge — `fit: "bleed"` makes each picture the tile itself (no frame, the site’s corners clip it; a linked one lifts with a shadow), and `ratio: "3/2"` gives every tile one shape, cropping each picture round its `focus`. Leave `ratio` at `auto` to keep each picture’s own shape; with the default `fit: "frame"` a set ratio shows each picture whole inside the frame.', block: { type: 'tiles', variant: 'image', fit: 'bleed', ratio: '3/2', columns: 3, tiles: [{ href: '#', image: { src: '/placeholder.svg', alt: 'Craft market poster — details' } }, { href: '#', image: { src: '/showcase-hero.svg', alt: 'Open day poster — details', focus: 'left' } }, { href: '#', image: { src: '/logos/badge.svg', alt: 'Club badge — about us', focus: 'center 25%' } }] } },
|
|
19
24
|
{ type: 'banner', description: 'A full-bleed feature band — a fixed/parallax background image with a scrim and a floating “shaded glass” card. Pure-CSS parallax; disabled on touch and under reduced-motion.', block: { type: 'banner', image: '/showcase-hero.svg', eyebrow: 'Featured', title: 'A banner that moves', text: 'The image is pinned to the viewport, so it drifts under this card as you scroll.', cta: { label: 'Take a look', href: '#' }, align: 'start' } },
|
|
20
25
|
{ type: 'stats', description: 'A band of headline numbers (value + label) over an optional heading — social proof at a glance.', block: { type: 'stats', title: 'By the numbers', background: 'muted', columns: 3, items: [{ value: '250+', label: 'projects shipped' }, { value: '99.9%', label: 'uptime', description: 'rolling 12 months' }, { value: '<1 day', label: 'average reply' }] } },
|
|
21
26
|
{ type: 'steps', description: 'A numbered process — connected cards (horizontal) or a stacked timeline (vertical).', block: { type: 'steps', title: 'How it works', layout: 'horizontal', items: [{ icon: 'chat', title: 'Tell us the problem', text: 'A straight conversation about the work costing you time.' }, { icon: 'sparkle', title: 'We fit it to you', text: 'The platform, shaped around how you actually work.' }, { icon: 'shield', title: 'You run it', text: 'Yours to use; we keep it running.' }] } },
|