@perkyzz/emvb 1.3.0 → 1.4.1
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/README.md +2 -2
- package/package.json +2 -2
- package/src/admin/bulk-api.ts +5 -1
- package/src/admin/content-item.ts +3 -0
- package/src/admin/copy-rich-text.ts +99 -9
- package/src/admin/editor/A11yCopilot.tsx +3 -1
- package/src/admin/editor/Editor.tsx +28 -3
- package/src/admin/editor/Timeline.tsx +1 -8
- package/src/admin/editor/canvas/DeviceBar.tsx +7 -2
- package/src/admin/editor/canvas/EmptyCanvas.tsx +11 -2
- package/src/admin/editor/canvas/use-canvas-dnd.ts +1 -20
- package/src/admin/editor/canvas/vnode-react.tsx +2 -0
- package/src/admin/editor/co-design.ts +36 -1
- package/src/admin/editor/collection-previews.ts +7 -8
- package/src/admin/editor/dnd/dragged-source.ts +22 -0
- package/src/admin/editor/dnd/layer-drop.ts +141 -0
- package/src/admin/editor/dnd/new-element.ts +16 -0
- package/src/admin/editor/editor-css.ts +9 -1
- package/src/admin/editor/element-chrome.ts +6 -0
- package/src/admin/editor/extensions/ExtensionPanels.tsx +33 -1
- package/src/admin/editor/extensions-context.tsx +16 -1
- package/src/admin/editor/feature-css.ts +27 -0
- package/src/admin/editor/inert-links.ts +8 -0
- package/src/admin/editor/panels/ColorControl.tsx +2 -2
- package/src/admin/editor/panels/ConditionsEditor.tsx +18 -0
- package/src/admin/editor/panels/ElementPanel.tsx +2 -2
- package/src/admin/editor/panels/FontFaces.tsx +342 -0
- package/src/admin/editor/panels/LayersPanel.tsx +56 -6
- package/src/admin/editor/panels/LeftPanel.tsx +153 -29
- package/src/admin/editor/panels/SettingsPanel.tsx +1 -0
- package/src/admin/editor/panels/SiteStylesDrawer.tsx +5 -0
- package/src/admin/editor/panels/TemplatesPanel.tsx +205 -0
- package/src/admin/editor/panels/TokenScales.tsx +2 -0
- package/src/admin/editor/panels/TriggersEditor.tsx +203 -9
- package/src/admin/editor/panels/VariableSection.tsx +111 -7
- package/src/admin/editor/panels/color-space.ts +71 -6
- package/src/admin/editor/panels/settings/AudienceEditor.tsx +3 -0
- package/src/admin/editor/panels/settings/FieldControl.tsx +33 -0
- package/src/admin/editor/panels/settings/FormBindControl.tsx +27 -31
- package/src/admin/editor/panels/settings/ImageFieldControl.tsx +106 -0
- package/src/admin/editor/panels/settings/LoopItemBindControl.tsx +9 -3
- package/src/admin/editor/panels/settings/StickyControl.tsx +97 -0
- package/src/admin/editor/panels/settings/StyleRow.tsx +14 -0
- package/src/admin/editor/panels/settings/loop-context.ts +34 -3
- package/src/admin/editor/panels/settings/style-sections.ts +19 -2
- package/src/admin/editor/panels/url-rules.ts +43 -0
- package/src/admin/editor/panels/use-layers-drop.ts +232 -0
- package/src/admin/editor/store.ts +4 -2
- package/src/admin/editor/useExtensions.ts +3 -1
- package/src/admin/editor/useNodeActions.ts +74 -1
- package/src/admin/editor/useSave.ts +116 -85
- package/src/admin/export-api.ts +27 -2
- package/src/admin/extension-outputs.ts +236 -0
- package/src/admin/font-files-api.ts +38 -0
- package/src/admin/import-forms.ts +133 -0
- package/src/admin/pages/ImportButton.tsx +15 -4
- package/src/admin/pages/ImportElementorDialog.tsx +53 -187
- package/src/admin/pages/ImportForms.tsx +71 -0
- package/src/admin/pages/ImportHtmlDialog.tsx +209 -0
- package/src/admin/pages/ImportImageCopies.tsx +167 -0
- package/src/admin/pages/ImportReport.tsx +63 -0
- package/src/admin/pages/NewPageDialog.tsx +54 -32
- package/src/admin/pages/PageList.tsx +9 -0
- package/src/admin/pages/ThemePartList.tsx +9 -0
- package/src/admin/setup/plan.ts +2 -0
- package/src/admin/ui.ts +7 -0
- package/src/admin/widgets/ConvertToRichText.tsx +3 -2
- package/src/astro/EmVBPage.astro +5 -2
- package/src/astro/extension-styles.ts +35 -0
- package/src/astro/forms/EmVBFormsClient.astro +3 -0
- package/src/astro/forms/enhance.ts +107 -0
- package/src/astro/popups/runtime.ts +47 -2
- package/src/astro/render.ts +25 -4
- package/src/astro/resolve-theme.ts +11 -4
- package/src/astro/resolve.ts +2 -0
- package/src/astro/theme-posts.ts +17 -23
- package/src/astro/visitor.ts +14 -5
- package/src/astro/widgets/EmVBStickyRuntime.astro +9 -0
- package/src/astro/widgets/EmVBThemeRuntime.astro +9 -0
- package/src/astro/widgets/EmVBWidgetRuntimes.astro +12 -0
- package/src/astro/widgets/alerts.ts +16 -2
- package/src/astro/widgets/carousel.ts +65 -24
- package/src/astro/widgets/countdown.ts +18 -7
- package/src/astro/widgets/extension-runtimes.ts +27 -0
- package/src/astro/widgets/headline.ts +14 -5
- package/src/astro/widgets/sticky.ts +87 -0
- package/src/astro/widgets/theme.ts +52 -0
- package/src/constants.ts +1 -1
- package/src/core/a11y/audit.ts +150 -2
- package/src/core/arrange.ts +19 -1
- package/src/core/css/font-face.ts +72 -0
- package/src/core/css/generate.ts +41 -2
- package/src/core/css/trace.ts +8 -0
- package/src/core/data/bindings.ts +7 -4
- package/src/core/elements/dynamic-elements.ts +1 -1
- package/src/core/elements/element-nouns.ts +48 -0
- package/src/core/elements/form-elements.ts +119 -9
- package/src/core/elements/icon-svg.ts +14 -0
- package/src/core/elements/index.ts +24 -4
- package/src/core/elements/input-limits.ts +44 -0
- package/src/core/elements/menu.ts +109 -47
- package/src/core/elements/site.ts +108 -0
- package/src/core/elements/widgets.ts +13 -3
- package/src/core/export/runtimes.generated.ts +7 -5
- package/src/core/export/site.ts +53 -4
- package/src/core/extensions/classes.ts +114 -0
- package/src/core/extensions/index.ts +19 -2
- package/src/core/extensions/normalize.ts +13 -0
- package/src/core/extensions/placeholder.ts +7 -2
- package/src/core/extensions/registry.ts +134 -10
- package/src/core/extensions/render-ext.ts +115 -36
- package/src/core/extensions/safe-nodes.ts +67 -11
- package/src/core/extensions/types.ts +48 -1
- package/src/core/fonts/files.ts +74 -0
- package/src/core/fonts/google.ts +112 -0
- package/src/core/fonts/test-font.ts +9 -0
- package/src/core/import/elementor/context.ts +42 -4
- package/src/core/import/elementor/index.ts +55 -23
- package/src/core/import/elementor/widgets.ts +242 -20
- package/src/core/import/html/blocks.ts +602 -0
- package/src/core/import/html/index.ts +155 -0
- package/src/core/import/html/map.ts +958 -0
- package/src/core/import/html/parse.ts +430 -0
- package/src/core/index.ts +54 -0
- package/src/core/migrate/v18.ts +3 -0
- package/src/core/public-attributes.ts +17 -0
- package/src/core/render/extras.ts +31 -7
- package/src/core/render/form.ts +103 -10
- package/src/core/render/index.ts +165 -16
- package/src/core/render/section.ts +31 -1
- package/src/core/render/spacer-basis.ts +102 -0
- package/src/core/render/theme-boot.ts +16 -0
- package/src/core/render/vnode.ts +1 -1
- package/src/core/sanitize/css.ts +68 -3
- package/src/core/sanitize/motion.ts +12 -0
- package/src/core/schema/design.ts +40 -0
- package/src/core/schema/layout.ts +118 -6
- package/src/core/schema/style.ts +28 -0
- package/src/core/templates/index.ts +218 -0
- package/src/core/templates/pages.ts +29 -0
- package/src/core/templates/sections.ts +794 -0
- package/src/core/templates/types.ts +9 -0
- package/src/core/theme/dynamic.ts +9 -6
- package/src/core/theme/media-value.ts +88 -0
- package/src/core/theme/popup-markup.ts +21 -2
- package/src/core/theme/popup-rules.ts +36 -0
- package/src/core/theme/triggers.ts +64 -5
- package/src/core/translatable.ts +5 -2
- package/src/core/visitor-cookie.ts +91 -0
- package/src/extension-build.ts +331 -0
- package/src/index.ts +53 -4
- package/src/mcp/agent-defaults.ts +40 -0
- package/src/mcp/brief.ts +191 -0
- package/src/mcp/extensions.ts +138 -0
- package/src/mcp/prompts.ts +33 -0
- package/src/mcp/read.ts +84 -20
- package/src/mcp/tools.ts +42 -3
- package/src/mcp/write.ts +124 -9
- package/src/server/extension-routes.ts +110 -0
- package/src/server/font-routes.ts +301 -0
- package/src/server/plugin.ts +15 -0
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
import type { TemplateData } from "./types.ts";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* W-1068: the starter sections, as plain layout JSON. Colours, sizes and spacing are `tpl-*`
|
|
5
|
+
* variable references and the button and card classes are `tpl-button` and `tpl-card`; on insert
|
|
6
|
+
* `resolveTemplateNode` swaps them for the site's own Site styles (or neutral fallbacks). No
|
|
7
|
+
* pictures: decorative shapes and colours only, so nothing points at media the site lacks.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const px = (value: number) => ({ value, unit: "px" });
|
|
11
|
+
const color = (token: string) => ({ var: `tpl-${token}` });
|
|
12
|
+
const font = (token: string) => ({ var: `tpl-${token}`, from: "fontSize" });
|
|
13
|
+
const space = (token: string) => ({ var: `tpl-${token}`, from: "spacing" });
|
|
14
|
+
|
|
15
|
+
const band = {
|
|
16
|
+
paddingTop: space("section"),
|
|
17
|
+
paddingBottom: space("section"),
|
|
18
|
+
paddingLeft: px(24),
|
|
19
|
+
paddingRight: px(24),
|
|
20
|
+
};
|
|
21
|
+
const wide = { contentWidth: px(1120) };
|
|
22
|
+
const centred = { alignItems: "center", textAlign: "center" };
|
|
23
|
+
const column = { flexDirection: "column", flexWrap: "nowrap" };
|
|
24
|
+
const lead = { fontSize: font("subheading"), color: color("muted") };
|
|
25
|
+
const body = { fontSize: font("body"), color: color("muted") };
|
|
26
|
+
const card = {
|
|
27
|
+
paddingTop: space("block"),
|
|
28
|
+
paddingBottom: space("block"),
|
|
29
|
+
paddingLeft: space("block"),
|
|
30
|
+
paddingRight: space("block"),
|
|
31
|
+
borderRadius: px(12),
|
|
32
|
+
borderWidth: px(1),
|
|
33
|
+
borderStyle: "solid",
|
|
34
|
+
borderColor: color("line"),
|
|
35
|
+
backgroundColor: color("surface"),
|
|
36
|
+
};
|
|
37
|
+
const primaryButton = {
|
|
38
|
+
paddingTop: px(12),
|
|
39
|
+
paddingBottom: px(12),
|
|
40
|
+
paddingLeft: px(24),
|
|
41
|
+
paddingRight: px(24),
|
|
42
|
+
borderRadius: px(8),
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
backgroundColor: color("accent"),
|
|
45
|
+
color: color("on-accent"),
|
|
46
|
+
};
|
|
47
|
+
const secondaryButton = {
|
|
48
|
+
paddingTop: px(12),
|
|
49
|
+
paddingBottom: px(12),
|
|
50
|
+
paddingLeft: px(24),
|
|
51
|
+
paddingRight: px(24),
|
|
52
|
+
borderRadius: px(8),
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
borderWidth: px(1),
|
|
55
|
+
borderStyle: "solid",
|
|
56
|
+
borderColor: color("line"),
|
|
57
|
+
};
|
|
58
|
+
const sectionHeader = (id: string, title: string, text: string): TemplateData => ({
|
|
59
|
+
id: `${id}-head`,
|
|
60
|
+
type: "flexbox",
|
|
61
|
+
props: {},
|
|
62
|
+
style: {
|
|
63
|
+
...column,
|
|
64
|
+
...centred,
|
|
65
|
+
gap: space("tight"),
|
|
66
|
+
maxWidth: px(720),
|
|
67
|
+
marginLeft: "auto",
|
|
68
|
+
marginRight: "auto",
|
|
69
|
+
},
|
|
70
|
+
children: [
|
|
71
|
+
{
|
|
72
|
+
id: `${id}-title`,
|
|
73
|
+
type: "heading",
|
|
74
|
+
props: { text: title, level: 2 },
|
|
75
|
+
style: { fontSize: font("heading"), color: color("ink") },
|
|
76
|
+
},
|
|
77
|
+
{ id: `${id}-intro`, type: "text", props: { text }, style: lead },
|
|
78
|
+
],
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export type SectionTemplate = {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
description: string;
|
|
85
|
+
node: TemplateData;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const SECTION_TEMPLATES: readonly SectionTemplate[] = [
|
|
89
|
+
{
|
|
90
|
+
id: "hero",
|
|
91
|
+
name: "Hero",
|
|
92
|
+
description: "A big headline, a line of text and two buttons.",
|
|
93
|
+
node: {
|
|
94
|
+
id: "hero-band",
|
|
95
|
+
type: "layout-section",
|
|
96
|
+
props: { tag: "section", ...wide },
|
|
97
|
+
style: { ...band, backgroundColor: color("surface") },
|
|
98
|
+
children: [
|
|
99
|
+
{
|
|
100
|
+
id: "hero-body",
|
|
101
|
+
type: "flexbox",
|
|
102
|
+
props: {},
|
|
103
|
+
style: {
|
|
104
|
+
...column,
|
|
105
|
+
...centred,
|
|
106
|
+
gap: space("gap"),
|
|
107
|
+
maxWidth: px(760),
|
|
108
|
+
marginLeft: "auto",
|
|
109
|
+
marginRight: "auto",
|
|
110
|
+
},
|
|
111
|
+
children: [
|
|
112
|
+
{
|
|
113
|
+
id: "hero-title",
|
|
114
|
+
type: "heading",
|
|
115
|
+
props: { text: "Say what you do in one clear line", level: 1 },
|
|
116
|
+
style: { fontSize: font("display"), lineHeight: 1.1, color: color("ink") },
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "hero-text",
|
|
120
|
+
type: "text",
|
|
121
|
+
props: {
|
|
122
|
+
text: "A sentence or two on who this is for and how it helps them. Replace this text with your own.",
|
|
123
|
+
},
|
|
124
|
+
style: lead,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "hero-actions",
|
|
128
|
+
type: "flexbox",
|
|
129
|
+
props: {},
|
|
130
|
+
style: {
|
|
131
|
+
flexDirection: "row",
|
|
132
|
+
flexWrap: "wrap",
|
|
133
|
+
gap: space("tight"),
|
|
134
|
+
justifyContent: "center",
|
|
135
|
+
},
|
|
136
|
+
children: [
|
|
137
|
+
{
|
|
138
|
+
id: "hero-primary",
|
|
139
|
+
type: "button",
|
|
140
|
+
props: { text: "Get started", href: "#" },
|
|
141
|
+
classes: ["tpl-button"],
|
|
142
|
+
style: primaryButton,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "hero-second",
|
|
146
|
+
type: "button",
|
|
147
|
+
props: { text: "See how it works", href: "#" },
|
|
148
|
+
style: secondaryButton,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "intro",
|
|
159
|
+
name: "Page intro",
|
|
160
|
+
description: "The page title and a short introduction, for inner pages.",
|
|
161
|
+
node: {
|
|
162
|
+
id: "intro-band",
|
|
163
|
+
type: "layout-section",
|
|
164
|
+
props: { tag: "section", ...wide },
|
|
165
|
+
style: { ...band, paddingBottom: space("block") },
|
|
166
|
+
children: [
|
|
167
|
+
{
|
|
168
|
+
id: "intro-body",
|
|
169
|
+
type: "flexbox",
|
|
170
|
+
props: {},
|
|
171
|
+
style: { ...column, gap: space("gap"), maxWidth: px(760) },
|
|
172
|
+
children: [
|
|
173
|
+
{
|
|
174
|
+
id: "intro-title",
|
|
175
|
+
type: "heading",
|
|
176
|
+
props: { text: "Page title", level: 1 },
|
|
177
|
+
style: { fontSize: font("display"), lineHeight: 1.1, color: color("ink") },
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "intro-text",
|
|
181
|
+
type: "text",
|
|
182
|
+
props: {
|
|
183
|
+
text: "One or two sentences that introduce this page and what visitors will find on it.",
|
|
184
|
+
},
|
|
185
|
+
style: lead,
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "features",
|
|
194
|
+
name: "Features",
|
|
195
|
+
description: "A heading over three benefits with icons.",
|
|
196
|
+
node: {
|
|
197
|
+
id: "feat-band",
|
|
198
|
+
type: "layout-section",
|
|
199
|
+
props: { tag: "section", ...wide },
|
|
200
|
+
style: band,
|
|
201
|
+
children: [
|
|
202
|
+
{
|
|
203
|
+
id: "feat-body",
|
|
204
|
+
type: "flexbox",
|
|
205
|
+
props: {},
|
|
206
|
+
style: { ...column, gap: space("block") },
|
|
207
|
+
children: [
|
|
208
|
+
sectionHeader(
|
|
209
|
+
"feat",
|
|
210
|
+
"Why people choose us",
|
|
211
|
+
"A short line that sums up the benefits below.",
|
|
212
|
+
),
|
|
213
|
+
{
|
|
214
|
+
id: "feat-grid",
|
|
215
|
+
type: "grid",
|
|
216
|
+
props: { columns: 3, columnsTablet: 3, columnsMobile: 1 },
|
|
217
|
+
style: { gap: space("gap") },
|
|
218
|
+
children: [
|
|
219
|
+
[
|
|
220
|
+
"feat-one",
|
|
221
|
+
"circle-check",
|
|
222
|
+
"Simple to use",
|
|
223
|
+
"Explain the first benefit in a sentence or two.",
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
"feat-two",
|
|
227
|
+
"clock",
|
|
228
|
+
"Saves time",
|
|
229
|
+
"Explain the second benefit in a sentence or two.",
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"feat-three",
|
|
233
|
+
"heart",
|
|
234
|
+
"Made for you",
|
|
235
|
+
"Explain the third benefit in a sentence or two.",
|
|
236
|
+
],
|
|
237
|
+
].map(([id, iconId, title, text]) => ({
|
|
238
|
+
id: id ?? "",
|
|
239
|
+
type: "icon-box",
|
|
240
|
+
props: { iconId, iconSize: 32, title, text },
|
|
241
|
+
classes: ["tpl-card"],
|
|
242
|
+
style: card,
|
|
243
|
+
})),
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: "stats",
|
|
252
|
+
name: "Stats",
|
|
253
|
+
description: "Three numbers that show what you have done.",
|
|
254
|
+
node: {
|
|
255
|
+
id: "stat-band",
|
|
256
|
+
type: "layout-section",
|
|
257
|
+
props: { tag: "section", ...wide },
|
|
258
|
+
style: band,
|
|
259
|
+
children: [
|
|
260
|
+
{
|
|
261
|
+
id: "stat-body",
|
|
262
|
+
type: "flexbox",
|
|
263
|
+
props: {},
|
|
264
|
+
style: { ...column, gap: space("block") },
|
|
265
|
+
children: [
|
|
266
|
+
{
|
|
267
|
+
id: "stat-title",
|
|
268
|
+
type: "heading",
|
|
269
|
+
props: { text: "Results so far", level: 2 },
|
|
270
|
+
style: { fontSize: font("heading"), color: color("ink"), textAlign: "center" },
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
id: "stat-grid",
|
|
274
|
+
type: "grid",
|
|
275
|
+
props: { columns: 3, columnsTablet: 3, columnsMobile: 1 },
|
|
276
|
+
style: { gap: space("gap") },
|
|
277
|
+
children: [
|
|
278
|
+
["stat-one", "500+", "Happy customers"],
|
|
279
|
+
["stat-two", "12", "Years of experience"],
|
|
280
|
+
["stat-three", "24/7", "Friendly support"],
|
|
281
|
+
].map(([id, value, label]) => ({
|
|
282
|
+
id: id ?? "",
|
|
283
|
+
type: "flexbox",
|
|
284
|
+
props: {},
|
|
285
|
+
style: { ...column, ...centred, gap: space("tight") },
|
|
286
|
+
children: [
|
|
287
|
+
{
|
|
288
|
+
id: `${id}-value`,
|
|
289
|
+
type: "text",
|
|
290
|
+
props: { text: value },
|
|
291
|
+
style: {
|
|
292
|
+
fontSize: font("display"),
|
|
293
|
+
fontWeight: 700,
|
|
294
|
+
lineHeight: 1.1,
|
|
295
|
+
color: color("ink"),
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
{ id: `${id}-label`, type: "text", props: { text: label }, style: body },
|
|
299
|
+
],
|
|
300
|
+
})),
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: "testimonials",
|
|
309
|
+
name: "Testimonials",
|
|
310
|
+
description: "Three customer quotes with names and star ratings.",
|
|
311
|
+
node: {
|
|
312
|
+
id: "quote-band",
|
|
313
|
+
type: "layout-section",
|
|
314
|
+
props: { tag: "section", ...wide },
|
|
315
|
+
style: band,
|
|
316
|
+
children: [
|
|
317
|
+
{
|
|
318
|
+
id: "quote-body",
|
|
319
|
+
type: "flexbox",
|
|
320
|
+
props: {},
|
|
321
|
+
style: { ...column, gap: space("block") },
|
|
322
|
+
children: [
|
|
323
|
+
sectionHeader(
|
|
324
|
+
"quote",
|
|
325
|
+
"What our customers say",
|
|
326
|
+
"Real words from real people build trust.",
|
|
327
|
+
),
|
|
328
|
+
{
|
|
329
|
+
id: "quote-grid",
|
|
330
|
+
type: "grid",
|
|
331
|
+
props: { columns: 3, columnsTablet: 1, columnsMobile: 1 },
|
|
332
|
+
style: { gap: space("gap") },
|
|
333
|
+
children: [
|
|
334
|
+
[
|
|
335
|
+
"quote-one",
|
|
336
|
+
"Setting up took an afternoon, and our visitors noticed the difference straight away.",
|
|
337
|
+
"Alex Morgan",
|
|
338
|
+
"Owner, Example Studio",
|
|
339
|
+
],
|
|
340
|
+
[
|
|
341
|
+
"quote-two",
|
|
342
|
+
"Clear, friendly and quick. Exactly what we were looking for.",
|
|
343
|
+
"Jordan Lee",
|
|
344
|
+
"Manager, Example Shop",
|
|
345
|
+
],
|
|
346
|
+
[
|
|
347
|
+
"quote-three",
|
|
348
|
+
"We would recommend them to anyone who wants things done well.",
|
|
349
|
+
"Sam Rivera",
|
|
350
|
+
"Founder, Example Co.",
|
|
351
|
+
],
|
|
352
|
+
].map(([id, quote, name, role]) => ({
|
|
353
|
+
id: id ?? "",
|
|
354
|
+
type: "testimonial",
|
|
355
|
+
props: { quote, name, role, rating: 5 },
|
|
356
|
+
classes: ["tpl-card"],
|
|
357
|
+
style: card,
|
|
358
|
+
})),
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id: "pricing",
|
|
367
|
+
name: "Pricing",
|
|
368
|
+
description: "Three plans side by side, the middle one featured.",
|
|
369
|
+
node: {
|
|
370
|
+
id: "price-band",
|
|
371
|
+
type: "layout-section",
|
|
372
|
+
props: { tag: "section", ...wide },
|
|
373
|
+
style: band,
|
|
374
|
+
children: [
|
|
375
|
+
{
|
|
376
|
+
id: "price-body",
|
|
377
|
+
type: "flexbox",
|
|
378
|
+
props: {},
|
|
379
|
+
style: { ...column, gap: space("block") },
|
|
380
|
+
children: [
|
|
381
|
+
sectionHeader(
|
|
382
|
+
"price",
|
|
383
|
+
"Simple, clear pricing",
|
|
384
|
+
"Pick the plan that fits. Change or cancel at any time.",
|
|
385
|
+
),
|
|
386
|
+
{
|
|
387
|
+
id: "price-grid",
|
|
388
|
+
type: "grid",
|
|
389
|
+
props: { columns: 3, columnsTablet: 1, columnsMobile: 1 },
|
|
390
|
+
style: { gap: space("gap"), alignItems: "stretch" },
|
|
391
|
+
children: [
|
|
392
|
+
{
|
|
393
|
+
id: "price-one",
|
|
394
|
+
type: "price-table",
|
|
395
|
+
props: {
|
|
396
|
+
title: "Starter",
|
|
397
|
+
description: "For trying things out.",
|
|
398
|
+
currency: "$",
|
|
399
|
+
price: "0",
|
|
400
|
+
period: "per month",
|
|
401
|
+
features: ["One project", "Email support"],
|
|
402
|
+
buttonText: "Choose Starter",
|
|
403
|
+
buttonHref: "#",
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "price-two",
|
|
408
|
+
type: "price-table",
|
|
409
|
+
props: {
|
|
410
|
+
title: "Pro",
|
|
411
|
+
description: "For growing teams.",
|
|
412
|
+
currency: "$",
|
|
413
|
+
price: "29",
|
|
414
|
+
period: "per month",
|
|
415
|
+
features: ["Unlimited projects", "Priority support", "Team members"],
|
|
416
|
+
buttonText: "Choose Pro",
|
|
417
|
+
buttonHref: "#",
|
|
418
|
+
featured: true,
|
|
419
|
+
ribbon: "Most popular",
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: "price-three",
|
|
424
|
+
type: "price-table",
|
|
425
|
+
props: {
|
|
426
|
+
title: "Business",
|
|
427
|
+
description: "For larger organisations.",
|
|
428
|
+
currency: "$",
|
|
429
|
+
price: "99",
|
|
430
|
+
period: "per month",
|
|
431
|
+
features: ["Everything in Pro", "Dedicated contact", "Custom setup"],
|
|
432
|
+
buttonText: "Contact us",
|
|
433
|
+
buttonHref: "#",
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
],
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
id: "faq",
|
|
445
|
+
name: "FAQ",
|
|
446
|
+
description: "Questions that open to show their answers, with no script.",
|
|
447
|
+
node: {
|
|
448
|
+
id: "faq-band",
|
|
449
|
+
type: "layout-section",
|
|
450
|
+
props: { tag: "section", ...wide },
|
|
451
|
+
style: band,
|
|
452
|
+
children: [
|
|
453
|
+
{
|
|
454
|
+
id: "faq-body",
|
|
455
|
+
type: "flexbox",
|
|
456
|
+
props: {},
|
|
457
|
+
style: {
|
|
458
|
+
...column,
|
|
459
|
+
gap: space("block"),
|
|
460
|
+
maxWidth: px(760),
|
|
461
|
+
marginLeft: "auto",
|
|
462
|
+
marginRight: "auto",
|
|
463
|
+
},
|
|
464
|
+
children: [
|
|
465
|
+
{
|
|
466
|
+
id: "faq-title",
|
|
467
|
+
type: "heading",
|
|
468
|
+
props: { text: "Questions and answers", level: 2 },
|
|
469
|
+
style: { fontSize: font("heading"), color: color("ink"), textAlign: "center" },
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
id: "faq-list",
|
|
473
|
+
type: "accordion",
|
|
474
|
+
props: {},
|
|
475
|
+
children: [
|
|
476
|
+
[
|
|
477
|
+
"faq-one",
|
|
478
|
+
"How do I get started?",
|
|
479
|
+
"Explain the first step in a sentence or two.",
|
|
480
|
+
],
|
|
481
|
+
[
|
|
482
|
+
"faq-two",
|
|
483
|
+
"How much does it cost?",
|
|
484
|
+
"Give a short, honest answer and point to the details.",
|
|
485
|
+
],
|
|
486
|
+
[
|
|
487
|
+
"faq-three",
|
|
488
|
+
"Can I change my mind later?",
|
|
489
|
+
"Say what happens if someone wants to cancel or change.",
|
|
490
|
+
],
|
|
491
|
+
[
|
|
492
|
+
"faq-four",
|
|
493
|
+
"How can I reach you?",
|
|
494
|
+
"List the best way to contact you and when you reply.",
|
|
495
|
+
],
|
|
496
|
+
].map(([id, summary, answer]) => ({
|
|
497
|
+
id: id ?? "",
|
|
498
|
+
type: "accordion-item",
|
|
499
|
+
props: { summary },
|
|
500
|
+
children: [
|
|
501
|
+
{ id: `${id}-answer`, type: "text", props: { text: answer }, style: body },
|
|
502
|
+
],
|
|
503
|
+
})),
|
|
504
|
+
},
|
|
505
|
+
],
|
|
506
|
+
},
|
|
507
|
+
],
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: "team",
|
|
512
|
+
name: "Team",
|
|
513
|
+
description: "Four people with their roles, ready for photos later.",
|
|
514
|
+
node: {
|
|
515
|
+
id: "team-band",
|
|
516
|
+
type: "layout-section",
|
|
517
|
+
props: { tag: "section", ...wide },
|
|
518
|
+
style: band,
|
|
519
|
+
children: [
|
|
520
|
+
{
|
|
521
|
+
id: "team-body",
|
|
522
|
+
type: "flexbox",
|
|
523
|
+
props: {},
|
|
524
|
+
style: { ...column, gap: space("block") },
|
|
525
|
+
children: [
|
|
526
|
+
sectionHeader("team", "Meet the team", "The people behind the work."),
|
|
527
|
+
{
|
|
528
|
+
id: "team-grid",
|
|
529
|
+
type: "grid",
|
|
530
|
+
props: { columns: 4, columnsTablet: 2, columnsMobile: 1 },
|
|
531
|
+
style: { gap: space("gap") },
|
|
532
|
+
children: [
|
|
533
|
+
["team-one", "Alex Morgan", "Founder"],
|
|
534
|
+
["team-two", "Jordan Lee", "Designer"],
|
|
535
|
+
["team-three", "Sam Rivera", "Developer"],
|
|
536
|
+
["team-four", "Casey Kim", "Support"],
|
|
537
|
+
].map(([id, name, role]) => ({
|
|
538
|
+
id: id ?? "",
|
|
539
|
+
type: "flexbox",
|
|
540
|
+
props: {},
|
|
541
|
+
classes: ["tpl-card"],
|
|
542
|
+
style: { ...card, ...column, ...centred, gap: space("tight") },
|
|
543
|
+
children: [
|
|
544
|
+
{
|
|
545
|
+
id: `${id}-shape`,
|
|
546
|
+
type: "div-block",
|
|
547
|
+
props: {},
|
|
548
|
+
style: {
|
|
549
|
+
width: px(72),
|
|
550
|
+
height: px(72),
|
|
551
|
+
borderRadius: px(999),
|
|
552
|
+
backgroundColor: color("accent"),
|
|
553
|
+
opacity: 0.85,
|
|
554
|
+
},
|
|
555
|
+
children: [],
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
id: `${id}-name`,
|
|
559
|
+
type: "heading",
|
|
560
|
+
props: { text: name, level: 3 },
|
|
561
|
+
style: { fontSize: font("subheading"), color: color("ink") },
|
|
562
|
+
},
|
|
563
|
+
{ id: `${id}-role`, type: "text", props: { text: role }, style: body },
|
|
564
|
+
],
|
|
565
|
+
})),
|
|
566
|
+
},
|
|
567
|
+
],
|
|
568
|
+
},
|
|
569
|
+
],
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
id: "cta",
|
|
574
|
+
name: "Call to action",
|
|
575
|
+
description: "A coloured band with a headline and one button.",
|
|
576
|
+
node: {
|
|
577
|
+
id: "cta-band",
|
|
578
|
+
type: "layout-section",
|
|
579
|
+
props: { tag: "section", ...wide },
|
|
580
|
+
style: { ...band, backgroundColor: color("accent") },
|
|
581
|
+
children: [
|
|
582
|
+
{
|
|
583
|
+
id: "cta-body",
|
|
584
|
+
type: "flexbox",
|
|
585
|
+
props: {},
|
|
586
|
+
style: { ...column, ...centred, gap: space("gap") },
|
|
587
|
+
children: [
|
|
588
|
+
{
|
|
589
|
+
id: "cta-title",
|
|
590
|
+
type: "heading",
|
|
591
|
+
props: { text: "Ready to get started?", level: 2 },
|
|
592
|
+
style: { fontSize: font("heading"), color: color("on-accent") },
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
id: "cta-text",
|
|
596
|
+
type: "text",
|
|
597
|
+
props: { text: "Tell visitors what happens when they click the button." },
|
|
598
|
+
style: { fontSize: font("body"), color: color("on-accent") },
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
id: "cta-button",
|
|
602
|
+
type: "button",
|
|
603
|
+
props: { text: "Start now", href: "#" },
|
|
604
|
+
style: {
|
|
605
|
+
...primaryButton,
|
|
606
|
+
backgroundColor: color("on-accent"),
|
|
607
|
+
color: color("accent"),
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
],
|
|
611
|
+
},
|
|
612
|
+
],
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
id: "contact",
|
|
617
|
+
name: "Contact details",
|
|
618
|
+
description: "Email, phone and address, plus opening hours.",
|
|
619
|
+
node: {
|
|
620
|
+
id: "contact-band",
|
|
621
|
+
type: "layout-section",
|
|
622
|
+
props: { tag: "section", ...wide },
|
|
623
|
+
style: band,
|
|
624
|
+
children: [
|
|
625
|
+
{
|
|
626
|
+
id: "contact-body",
|
|
627
|
+
type: "flexbox",
|
|
628
|
+
props: {},
|
|
629
|
+
style: { ...column, gap: space("block") },
|
|
630
|
+
children: [
|
|
631
|
+
sectionHeader("contact", "Get in touch", "We usually reply within one working day."),
|
|
632
|
+
{
|
|
633
|
+
id: "contact-grid",
|
|
634
|
+
type: "grid",
|
|
635
|
+
props: { columns: 3, columnsTablet: 3, columnsMobile: 1 },
|
|
636
|
+
style: { gap: space("gap") },
|
|
637
|
+
children: [
|
|
638
|
+
{
|
|
639
|
+
id: "contact-mail",
|
|
640
|
+
type: "icon-box",
|
|
641
|
+
props: {
|
|
642
|
+
iconId: "mail",
|
|
643
|
+
iconSize: 32,
|
|
644
|
+
title: "Email",
|
|
645
|
+
text: "hello@example.com",
|
|
646
|
+
href: "mailto:hello@example.com",
|
|
647
|
+
},
|
|
648
|
+
classes: ["tpl-card"],
|
|
649
|
+
style: card,
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
id: "contact-phone",
|
|
653
|
+
type: "icon-box",
|
|
654
|
+
props: {
|
|
655
|
+
iconId: "phone",
|
|
656
|
+
iconSize: 32,
|
|
657
|
+
title: "Phone",
|
|
658
|
+
text: "+1 555 0100",
|
|
659
|
+
href: "tel:+15550100",
|
|
660
|
+
},
|
|
661
|
+
classes: ["tpl-card"],
|
|
662
|
+
style: card,
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
id: "contact-visit",
|
|
666
|
+
type: "icon-box",
|
|
667
|
+
props: {
|
|
668
|
+
iconId: "house",
|
|
669
|
+
iconSize: 32,
|
|
670
|
+
title: "Visit",
|
|
671
|
+
text: "1 Example Street, Your City",
|
|
672
|
+
},
|
|
673
|
+
classes: ["tpl-card"],
|
|
674
|
+
style: card,
|
|
675
|
+
},
|
|
676
|
+
],
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
id: "contact-hours",
|
|
680
|
+
type: "text",
|
|
681
|
+
props: { text: "Opening hours: Monday to Friday, 9:00 to 17:00." },
|
|
682
|
+
style: { ...body, textAlign: "center" },
|
|
683
|
+
},
|
|
684
|
+
],
|
|
685
|
+
},
|
|
686
|
+
],
|
|
687
|
+
},
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
id: "footer",
|
|
691
|
+
name: "Footer",
|
|
692
|
+
description: "Your name, a tagline, two columns of links and a copyright line.",
|
|
693
|
+
node: {
|
|
694
|
+
id: "foot-band",
|
|
695
|
+
type: "layout-section",
|
|
696
|
+
props: { tag: "footer", ...wide },
|
|
697
|
+
style: {
|
|
698
|
+
paddingTop: space("block"),
|
|
699
|
+
paddingBottom: space("block"),
|
|
700
|
+
paddingLeft: px(24),
|
|
701
|
+
paddingRight: px(24),
|
|
702
|
+
backgroundColor: color("surface"),
|
|
703
|
+
},
|
|
704
|
+
children: [
|
|
705
|
+
{
|
|
706
|
+
id: "foot-body",
|
|
707
|
+
type: "flexbox",
|
|
708
|
+
props: {},
|
|
709
|
+
style: { ...column, gap: space("gap") },
|
|
710
|
+
children: [
|
|
711
|
+
{
|
|
712
|
+
id: "foot-grid",
|
|
713
|
+
type: "grid",
|
|
714
|
+
props: { columns: 3, columnsTablet: 3, columnsMobile: 1 },
|
|
715
|
+
style: { gap: space("gap") },
|
|
716
|
+
children: [
|
|
717
|
+
{
|
|
718
|
+
id: "foot-brand",
|
|
719
|
+
type: "flexbox",
|
|
720
|
+
props: {},
|
|
721
|
+
style: { ...column, gap: space("tight") },
|
|
722
|
+
children: [
|
|
723
|
+
{
|
|
724
|
+
id: "foot-name",
|
|
725
|
+
type: "text",
|
|
726
|
+
props: { text: "Your company" },
|
|
727
|
+
style: { fontSize: font("subheading"), fontWeight: 700, color: color("ink") },
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
id: "foot-tagline",
|
|
731
|
+
type: "text",
|
|
732
|
+
props: { text: "A short line about what you do." },
|
|
733
|
+
style: body,
|
|
734
|
+
},
|
|
735
|
+
],
|
|
736
|
+
},
|
|
737
|
+
...[
|
|
738
|
+
[
|
|
739
|
+
"foot-pages",
|
|
740
|
+
"Pages",
|
|
741
|
+
[
|
|
742
|
+
["Home", "/"],
|
|
743
|
+
["About", "/about"],
|
|
744
|
+
["Contact", "/contact"],
|
|
745
|
+
],
|
|
746
|
+
],
|
|
747
|
+
[
|
|
748
|
+
"foot-legal",
|
|
749
|
+
"Legal",
|
|
750
|
+
[
|
|
751
|
+
["Privacy", "/privacy"],
|
|
752
|
+
["Terms", "/terms"],
|
|
753
|
+
],
|
|
754
|
+
],
|
|
755
|
+
].map(([id, title, links]) => ({
|
|
756
|
+
id: String(id),
|
|
757
|
+
type: "flexbox",
|
|
758
|
+
props: {},
|
|
759
|
+
style: { ...column, gap: space("tight") },
|
|
760
|
+
children: [
|
|
761
|
+
{
|
|
762
|
+
id: `${id}-title`,
|
|
763
|
+
type: "text",
|
|
764
|
+
props: { text: title },
|
|
765
|
+
style: { fontSize: font("body"), fontWeight: 600, color: color("ink") },
|
|
766
|
+
},
|
|
767
|
+
...(links as string[][]).map(([text, href], n) => ({
|
|
768
|
+
id: `${id}-${n + 1}`,
|
|
769
|
+
type: "link",
|
|
770
|
+
props: { text, href },
|
|
771
|
+
style: { fontSize: font("body"), color: color("ink") },
|
|
772
|
+
})),
|
|
773
|
+
],
|
|
774
|
+
})),
|
|
775
|
+
],
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
id: "foot-rule",
|
|
779
|
+
type: "divider",
|
|
780
|
+
props: {},
|
|
781
|
+
style: { borderColor: color("line") },
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
id: "foot-copy",
|
|
785
|
+
type: "text",
|
|
786
|
+
props: { text: "© Your company. All rights reserved." },
|
|
787
|
+
style: { fontSize: font("small"), color: color("muted") },
|
|
788
|
+
},
|
|
789
|
+
],
|
|
790
|
+
},
|
|
791
|
+
],
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
];
|