domma-cms 1.8.44 → 1.8.45
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/CHANGELOG.md +4 -0
- package/admin/js/templates/docs/usage-blocks.html +29 -0
- package/docs/starter-blocks.md +203 -0
- package/package.json +1 -1
- package/server/blocks/catalog.json +98 -0
- package/server/blocks/domma-block-banner.css +65 -0
- package/server/blocks/domma-block-banner.html +22 -0
- package/server/blocks/domma-block-banner.meta.json +7 -0
- package/server/blocks/domma-block-contact.css +18 -0
- package/server/blocks/domma-block-contact.html +15 -0
- package/server/blocks/domma-block-contact.meta.json +7 -0
- package/server/blocks/domma-block-cta.css +8 -0
- package/server/blocks/domma-block-cta.html +17 -0
- package/server/blocks/domma-block-cta.meta.json +7 -0
- package/server/blocks/domma-block-faq.css +13 -0
- package/server/blocks/domma-block-faq.html +17 -0
- package/server/blocks/domma-block-faq.meta.json +7 -0
- package/server/blocks/domma-block-features.css +18 -0
- package/server/blocks/domma-block-features.html +19 -0
- package/server/blocks/domma-block-features.meta.json +7 -0
- package/server/blocks/domma-block-hero.css +15 -0
- package/server/blocks/domma-block-hero.html +13 -0
- package/server/blocks/domma-block-hero.meta.json +7 -0
- package/server/blocks/domma-block-image.css +8 -0
- package/server/blocks/domma-block-image.html +12 -0
- package/server/blocks/domma-block-image.meta.json +7 -0
- package/server/blocks/domma-block-logos.css +13 -0
- package/server/blocks/domma-block-logos.html +18 -0
- package/server/blocks/domma-block-logos.meta.json +7 -0
- package/server/blocks/domma-block-pricing-card.css +20 -0
- package/server/blocks/domma-block-pricing-card.html +15 -0
- package/server/blocks/domma-block-pricing-card.meta.json +7 -0
- package/server/blocks/domma-block-service-card.css +17 -0
- package/server/blocks/domma-block-service-card.html +15 -0
- package/server/blocks/domma-block-service-card.meta.json +7 -0
- package/server/blocks/domma-block-split.css +26 -0
- package/server/blocks/domma-block-split.html +22 -0
- package/server/blocks/domma-block-split.meta.json +7 -0
- package/server/blocks/domma-block-stats.css +20 -0
- package/server/blocks/domma-block-stats.html +16 -0
- package/server/blocks/domma-block-stats.meta.json +7 -0
- package/server/blocks/domma-block-steps.css +19 -0
- package/server/blocks/domma-block-steps.html +17 -0
- package/server/blocks/domma-block-steps.meta.json +7 -0
- package/server/blocks/domma-block-team-card.css +13 -0
- package/server/blocks/domma-block-team-card.html +14 -0
- package/server/blocks/domma-block-team-card.meta.json +7 -0
- package/server/blocks/domma-block-testimonial.css +13 -0
- package/server/blocks/domma-block-testimonial.html +12 -0
- package/server/blocks/domma-block-testimonial.meta.json +7 -0
- package/server/blocks/domma-block-text.css +9 -0
- package/server/blocks/domma-block-text.html +11 -0
- package/server/blocks/domma-block-text.meta.json +7 -0
- package/server/services/blocks.js +2 -0
- package/server/services/starter-blocks.js +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.8.45] - 2026-10-23
|
|
4
|
+
|
|
5
|
+
- Include a free library of 16 editable `domma-block-*` Custom Blocks with every site: introductions, image/text sections, features, services, testimonials, figures, steps, FAQs, contact details, pricing, team profiles, images, logos and calls to action. Each includes scoped responsive styling and examples. Startup adds missing blocks while preserving site customisations.
|
|
6
|
+
|
|
3
7
|
## [1.8.44] - 2026-10-23
|
|
4
8
|
|
|
5
9
|
- **Blocks with empty fields no longer show raw HTML.** A block placeholder on its own line with nothing to fill it (`{{bio}}` when there is no bio) left a blank line, which ended the block's HTML in the Markdown, and what followed showed on the page as code - the About page's team card printed its contact links as raw tags. Such a line is now dropped when it fills empty (`fillTemplateLines()` in `markdown.js`), for collection displays and block short tags alike; a template's own blank lines stay, since they are how it hands a Markdown value to marked.
|
|
@@ -16,6 +16,35 @@
|
|
|
16
16
|
<code><name>.html</code> holds the template, <code><name>.css</code> its styles (optional) and
|
|
17
17
|
<code><name>.meta.json</code> its project and bundled flag (optional).</p>
|
|
18
18
|
|
|
19
|
+
<h3>A free library to start your site</h3>
|
|
20
|
+
<p>Every site includes 16 editable <code>domma-block-*</code> blocks. Search for
|
|
21
|
+
<code>domma-block-</code> in Blocks or use <strong>Add block</strong> in the editor.
|
|
22
|
+
Each includes its own styling, documented parameters and an example to copy.</p>
|
|
23
|
+
<table class="table table-sm"><thead><tr><th>Block</th><th>Use it for</th></tr></thead><tbody>
|
|
24
|
+
<tr><td><code>domma-block-banner</code></td><td>A photo banner with a readable overlay across its left half.</td></tr>
|
|
25
|
+
<tr><td><code>domma-block-split</code></td><td>An image beside a section heading and introduction.</td></tr>
|
|
26
|
+
<tr><td><code>domma-block-cta</code></td><td>A welcoming call to action using your site theme.</td></tr>
|
|
27
|
+
<tr><td><code>domma-block-hero</code></td><td>A centred page introduction with an optional button.</td></tr>
|
|
28
|
+
<tr><td><code>domma-block-text</code></td><td>A readable text section for your story or an introduction.</td></tr>
|
|
29
|
+
<tr><td><code>domma-block-features</code></td><td>An introduction and up to three feature cards.</td></tr>
|
|
30
|
+
<tr><td><code>domma-block-service-card</code></td><td>A reusable service card with an optional photo and button.</td></tr>
|
|
31
|
+
<tr><td><code>domma-block-testimonial</code></td><td>A customer quotation with an optional attribution.</td></tr>
|
|
32
|
+
<tr><td><code>domma-block-stats</code></td><td>Up to three useful figures with clear labels.</td></tr>
|
|
33
|
+
<tr><td><code>domma-block-steps</code></td><td>A clear, numbered process with up to three steps.</td></tr>
|
|
34
|
+
<tr><td><code>domma-block-faq</code></td><td>Up to three questions and answers, readable without JavaScript.</td></tr>
|
|
35
|
+
<tr><td><code>domma-block-contact</code></td><td>Contact details, an address and opening hours.</td></tr>
|
|
36
|
+
<tr><td><code>domma-block-pricing-card</code></td><td>A clear price or package card with an optional enquiry button.</td></tr>
|
|
37
|
+
<tr><td><code>domma-block-team-card</code></td><td>A team member photo, role and short introduction.</td></tr>
|
|
38
|
+
<tr><td><code>domma-block-image</code></td><td>An uncropped image with an optional caption.</td></tr>
|
|
39
|
+
<tr><td><code>domma-block-logos</code></td><td>A responsive row of up to four organisation logos.</td></tr>
|
|
40
|
+
</tbody></table>
|
|
41
|
+
<p>Start with a banner or hero, add sections and cards, then finish with a call to action.
|
|
42
|
+
Change the text and choose your own pictures from Media. Use one main heading per page.
|
|
43
|
+
Leave optional buttons and unused feature, FAQ, step, figure or logo slots empty to hide them.</p>
|
|
44
|
+
<pre><code>[domma-block-hero header="Welcome to our business" blurb="A short introduction to what we do." link="/contact" label="Get in touch" /]</code></pre>
|
|
45
|
+
<p>Blocks follow your theme and adapt to smaller screens. You can edit or duplicate them;
|
|
46
|
+
updates add missing library files without replacing your existing customisations.</p>
|
|
47
|
+
|
|
19
48
|
<h3>Three ways to place a block</h3>
|
|
20
49
|
<table class="table table-sm">
|
|
21
50
|
<thead>
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Domma block library
|
|
2
|
+
|
|
3
|
+
Sixteen free, editable Custom Blocks come with every Domma CMS site. There is
|
|
4
|
+
no extra licence or plugin to install. Search for `domma-block-` in **Blocks**
|
|
5
|
+
or in the editor's **Add block** menu. Each block includes its own scoped CSS,
|
|
6
|
+
a copyable example and documented parameters.
|
|
7
|
+
|
|
8
|
+
## Choose a block
|
|
9
|
+
|
|
10
|
+
| Block | Use it for |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `domma-block-banner` | A photo banner with a readable overlay across its left half. |
|
|
13
|
+
| `domma-block-split` | An image beside a section heading and introduction. |
|
|
14
|
+
| `domma-block-cta` | A welcoming call to action using your site theme. |
|
|
15
|
+
| `domma-block-hero` | A centred page introduction with an optional button. |
|
|
16
|
+
| `domma-block-text` | A readable text section for your story or an introduction. |
|
|
17
|
+
| `domma-block-features` | An introduction and up to three feature cards. |
|
|
18
|
+
| `domma-block-service-card` | A reusable service card with an optional photo and button. |
|
|
19
|
+
| `domma-block-testimonial` | A customer quotation with an optional attribution. |
|
|
20
|
+
| `domma-block-stats` | Up to three useful figures with clear labels. |
|
|
21
|
+
| `domma-block-steps` | A clear, numbered process with up to three steps. |
|
|
22
|
+
| `domma-block-faq` | Up to three questions and answers, readable without JavaScript. |
|
|
23
|
+
| `domma-block-contact` | Contact details, an address and opening hours. |
|
|
24
|
+
| `domma-block-pricing-card` | A clear price or package card with an optional enquiry button. |
|
|
25
|
+
| `domma-block-team-card` | A team member photo, role and short introduction. |
|
|
26
|
+
| `domma-block-image` | An uncropped image with an optional caption. |
|
|
27
|
+
| `domma-block-logos` | A responsive row of up to four organisation logos. |
|
|
28
|
+
|
|
29
|
+
## Make it yours
|
|
30
|
+
|
|
31
|
+
Replace example picture addresses with images from your Media library. Headings,
|
|
32
|
+
introductions and other text parameters accept plain text. Use `alt` to describe
|
|
33
|
+
an image, or leave it empty when the image is decorative. Add both `link` and
|
|
34
|
+
`label` for a button; omit them to hide it. Unused feature, step, FAQ, figure and
|
|
35
|
+
logo slots are hidden automatically.
|
|
36
|
+
|
|
37
|
+
The banner and hero use an `h1` main heading. Choose one for each page; the other
|
|
38
|
+
sections use `h2` headings, and individual service, team and price cards use
|
|
39
|
+
`h3`. Place cards below a section heading. Image and card blocks can also go
|
|
40
|
+
inside your usual grid or column shortcodes.
|
|
41
|
+
|
|
42
|
+
All blocks adapt to smaller screens, use your site's theme where appropriate,
|
|
43
|
+
and work without the Domma marketing stylesheet. FAQ questions and answers stay
|
|
44
|
+
readable without JavaScript. Contact email and phone links
|
|
45
|
+
open the visitor's usual apps. Prices are display text, so include your currency,
|
|
46
|
+
billing period and any tax wording explicitly. Use your own real figures,
|
|
47
|
+
approved customer quotes and organisation logos.
|
|
48
|
+
|
|
49
|
+
Edit or duplicate a block to change its design. The CMS adds missing library
|
|
50
|
+
files on startup and preserves existing HTML, CSS and metadata files. Existing
|
|
51
|
+
sites receive new blocks when they upgrade to a CMS version that includes them.
|
|
52
|
+
|
|
53
|
+
## Copy an example
|
|
54
|
+
|
|
55
|
+
### domma-block-banner
|
|
56
|
+
|
|
57
|
+
A photo banner with a readable overlay across its left half.
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
[domma-block-banner header="A little guidance, or a helping hand." blurb="Find an answer, learn something new or get in touch." image="/media/banner.jpg" alt="People working together at a laptop" link="/contact" label="Get in touch" /]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### domma-block-split
|
|
64
|
+
|
|
65
|
+
An image beside a section heading and introduction.
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
[domma-block-split header="Made for your business" blurb="Tell visitors how you can help." image="/media/about.jpg" alt="Our workspace" link="/about" label="Meet us" /]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### domma-block-cta
|
|
72
|
+
|
|
73
|
+
A welcoming call to action using your site theme.
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
[domma-block-cta header="Have something in mind?" blurb="Tell us a little about your plans." link="/contact" label="Let us help" /]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### domma-block-hero
|
|
80
|
+
|
|
81
|
+
A centred page introduction with an optional button.
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
[domma-block-hero header="Welcome to your next chapter" blurb="Say what you do and who you help." link="/contact" label="Let us help" /]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### domma-block-text
|
|
88
|
+
|
|
89
|
+
A readable text section for your story or an introduction.
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
[domma-block-text header="Our story" blurb="Share a little about your business and the people behind it." /]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### domma-block-features
|
|
96
|
+
|
|
97
|
+
An introduction and up to three feature cards.
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
[domma-block-features header="How we help" blurb="Practical support for your business." title1="Plan" text1="Find the right direction." title2="Build" text2="Bring your ideas to life." title3="Grow" text3="Keep moving forward." /]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### domma-block-service-card
|
|
104
|
+
|
|
105
|
+
A reusable service card with an optional photo and button.
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
[domma-block-service-card header="Your service" blurb="Explain the benefit in a sentence or two." link="/services" label="Find out more" /]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### domma-block-testimonial
|
|
112
|
+
|
|
113
|
+
A customer quotation with an optional attribution.
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
[domma-block-testimonial quote="Replace this with a customer quotation you have permission to share." name="Customer name" detail="Business or role" /]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### domma-block-stats
|
|
120
|
+
|
|
121
|
+
Up to three useful figures with clear labels.
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
[domma-block-stats header="A few useful facts" value1="Your figure" label1="Explain what it represents" /]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### domma-block-steps
|
|
128
|
+
|
|
129
|
+
A clear, numbered process with up to three steps.
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
[domma-block-steps header="Getting started" blurb="A simple way forward." title1="Say hello" text1="Tell us what you need." title2="Make a plan" text2="Agree the details together." title3="Get going" text3="Put your plan into action." /]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### domma-block-faq
|
|
136
|
+
|
|
137
|
+
Up to three questions and answers, readable without JavaScript.
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
[domma-block-faq header="A few common questions" question1="How do we get started?" answer1="Get in touch and tell us what you have in mind." question2="Can I ask a question first?" answer2="Of course. We are happy to help." /]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### domma-block-contact
|
|
144
|
+
|
|
145
|
+
Contact details, an address and opening hours.
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
[domma-block-contact header="Get in touch" blurb="Tell us how we can help." email="hello@example.com" phone="+44 1234 567890" address="Your business address" hours="Your opening hours" /]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### domma-block-pricing-card
|
|
152
|
+
|
|
153
|
+
A clear price or package card with an optional enquiry button.
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
[domma-block-pricing-card header="Your package" price="Ask for a quote" blurb="Describe exactly what is included." link="/contact" label="Talk it through" /]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### domma-block-team-card
|
|
160
|
+
|
|
161
|
+
A team member photo, role and short introduction.
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
[domma-block-team-card name="Team member" role="Role or specialism" blurb="A short, friendly introduction." image="/media/team-member.jpg" alt="Portrait of your team member" /]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### domma-block-image
|
|
168
|
+
|
|
169
|
+
An uncropped image with an optional caption.
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
[domma-block-image image="/media/your-work.jpg" alt="Describe what visitors can see" caption="Add a little context to the image." /]
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### domma-block-logos
|
|
176
|
+
|
|
177
|
+
A responsive row of up to four organisation logos.
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
[domma-block-logos header="Who we work with" image1="/media/partner-logo.svg" alt1="Partner name" /]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Blocks in headers, footers and menus
|
|
184
|
+
|
|
185
|
+
The running CMS already supports custom blocks in **Site Settings > Footer**.
|
|
186
|
+
The selected blocks appear above the standard footer menus. Each footer entry
|
|
187
|
+
is a block name, without per-placement parameters, so duplicate a starter block
|
|
188
|
+
and replace its placeholders with your site's details before selecting it there.
|
|
189
|
+
|
|
190
|
+
A custom block can also contain a menu shortcode, for example:
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
[menu location="footer-primary" /]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Keep navigation links in Menus so visibility, nesting and current-page behaviour
|
|
197
|
+
continue to come from the menu system. A block can supply the surrounding layout.
|
|
198
|
+
|
|
199
|
+
Header block slots would be a useful next step: a shared announcement bar,
|
|
200
|
+
contact strip or branded header around the existing navigation. They are a
|
|
201
|
+
proposed extension, not part of this library change. Replacing the full navigation
|
|
202
|
+
would also need to retain mobile controls, keyboard access and the visitor's
|
|
203
|
+
current-page indication.
|
package/package.json
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "domma-block-banner",
|
|
4
|
+
"category": "introductions",
|
|
5
|
+
"description": "A photo banner with a readable overlay across its left half.",
|
|
6
|
+
"example": "[domma-block-banner header=\"A little guidance, or a helping hand.\" blurb=\"Find an answer, learn something new or get in touch.\" image=\"/media/banner.jpg\" alt=\"People working together at a laptop\" link=\"/contact\" label=\"Get in touch\" /]"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "domma-block-split",
|
|
10
|
+
"category": "content",
|
|
11
|
+
"description": "An image beside a section heading and introduction.",
|
|
12
|
+
"example": "[domma-block-split header=\"Made for your business\" blurb=\"Tell visitors how you can help.\" image=\"/media/about.jpg\" alt=\"Our workspace\" link=\"/about\" label=\"Meet us\" /]"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "domma-block-cta",
|
|
16
|
+
"category": "conversion",
|
|
17
|
+
"description": "A welcoming call to action using your site theme.",
|
|
18
|
+
"example": "[domma-block-cta header=\"Have something in mind?\" blurb=\"Tell us a little about your plans.\" link=\"/contact\" label=\"Let us help\" /]"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "domma-block-hero",
|
|
22
|
+
"category": "introductions",
|
|
23
|
+
"description": "A centred page introduction with an optional button.",
|
|
24
|
+
"example": "[domma-block-hero header=\"Welcome to your next chapter\" blurb=\"Say what you do and who you help.\" link=\"/contact\" label=\"Let us help\" /]"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "domma-block-text",
|
|
28
|
+
"category": "content",
|
|
29
|
+
"description": "A readable text section for your story or an introduction.",
|
|
30
|
+
"example": "[domma-block-text header=\"Our story\" blurb=\"Share a little about your business and the people behind it.\" /]"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "domma-block-features",
|
|
34
|
+
"category": "services",
|
|
35
|
+
"description": "An introduction and up to three feature cards.",
|
|
36
|
+
"example": "[domma-block-features header=\"How we help\" blurb=\"Practical support for your business.\" title1=\"Plan\" text1=\"Find the right direction.\" title2=\"Build\" text2=\"Bring your ideas to life.\" title3=\"Grow\" text3=\"Keep moving forward.\" /]"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "domma-block-service-card",
|
|
40
|
+
"category": "services",
|
|
41
|
+
"description": "A reusable service card with an optional photo and button.",
|
|
42
|
+
"example": "[domma-block-service-card header=\"Your service\" blurb=\"Explain the benefit in a sentence or two.\" link=\"/services\" label=\"Find out more\" /]"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "domma-block-testimonial",
|
|
46
|
+
"category": "trust",
|
|
47
|
+
"description": "A customer quotation with an optional attribution.",
|
|
48
|
+
"example": "[domma-block-testimonial quote=\"Replace this with a customer quotation you have permission to share.\" name=\"Customer name\" detail=\"Business or role\" /]"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "domma-block-stats",
|
|
52
|
+
"category": "trust",
|
|
53
|
+
"description": "Up to three useful figures with clear labels.",
|
|
54
|
+
"example": "[domma-block-stats header=\"A few useful facts\" value1=\"Your figure\" label1=\"Explain what it represents\" /]"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "domma-block-steps",
|
|
58
|
+
"category": "services",
|
|
59
|
+
"description": "A clear, numbered process with up to three steps.",
|
|
60
|
+
"example": "[domma-block-steps header=\"Getting started\" blurb=\"A simple way forward.\" title1=\"Say hello\" text1=\"Tell us what you need.\" title2=\"Make a plan\" text2=\"Agree the details together.\" title3=\"Get going\" text3=\"Put your plan into action.\" /]"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "domma-block-faq",
|
|
64
|
+
"category": "support",
|
|
65
|
+
"description": "Up to three questions and answers, readable without JavaScript.",
|
|
66
|
+
"example": "[domma-block-faq header=\"A few common questions\" question1=\"How do we get started?\" answer1=\"Get in touch and tell us what you have in mind.\" question2=\"Can I ask a question first?\" answer2=\"Of course. We are happy to help.\" /]"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "domma-block-contact",
|
|
70
|
+
"category": "support",
|
|
71
|
+
"description": "Contact details, an address and opening hours.",
|
|
72
|
+
"example": "[domma-block-contact header=\"Get in touch\" blurb=\"Tell us how we can help.\" email=\"hello@example.com\" phone=\"+44 1234 567890\" address=\"Your business address\" hours=\"Your opening hours\" /]"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "domma-block-pricing-card",
|
|
76
|
+
"category": "services",
|
|
77
|
+
"description": "A clear price or package card with an optional enquiry button.",
|
|
78
|
+
"example": "[domma-block-pricing-card header=\"Your package\" price=\"Ask for a quote\" blurb=\"Describe exactly what is included.\" link=\"/contact\" label=\"Talk it through\" /]"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "domma-block-team-card",
|
|
82
|
+
"category": "trust",
|
|
83
|
+
"description": "A team member photo, role and short introduction.",
|
|
84
|
+
"example": "[domma-block-team-card name=\"Team member\" role=\"Role or specialism\" blurb=\"A short, friendly introduction.\" image=\"/media/team-member.jpg\" alt=\"Portrait of your team member\" /]"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "domma-block-image",
|
|
88
|
+
"category": "content",
|
|
89
|
+
"description": "An uncropped image with an optional caption.",
|
|
90
|
+
"example": "[domma-block-image image=\"/media/your-work.jpg\" alt=\"Describe what visitors can see\" caption=\"Add a little context to the image.\" /]"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "domma-block-logos",
|
|
94
|
+
"category": "trust",
|
|
95
|
+
"description": "A responsive row of up to four organisation logos.",
|
|
96
|
+
"example": "[domma-block-logos header=\"Who we work with\" image1=\"/media/partner-logo.svg\" alt1=\"Partner name\" /]"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.db-banner {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
position: relative;
|
|
4
|
+
isolation: isolate;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
7
|
+
background: #152832;
|
|
8
|
+
color: #fff;
|
|
9
|
+
}
|
|
10
|
+
.db-banner-image {
|
|
11
|
+
position: absolute;
|
|
12
|
+
inset: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
}
|
|
17
|
+
.db-banner-image[src=""], .db-banner-image:not([src]) { display: none; }
|
|
18
|
+
.db-banner-panel {
|
|
19
|
+
position: relative;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
width: 50%;
|
|
26
|
+
min-height: 30rem;
|
|
27
|
+
padding: clamp(1.5rem, 4vw, 3.5rem);
|
|
28
|
+
background: rgb(13 30 40 / 92%);
|
|
29
|
+
}
|
|
30
|
+
.db-banner-heading {
|
|
31
|
+
margin: 0 0 1.25rem;
|
|
32
|
+
color: #fff;
|
|
33
|
+
font-size: clamp(2rem, 3.5vw, 3.25rem);
|
|
34
|
+
line-height: 1.12;
|
|
35
|
+
letter-spacing: -.02em;
|
|
36
|
+
overflow-wrap: anywhere;
|
|
37
|
+
}
|
|
38
|
+
.db-banner-blurb {
|
|
39
|
+
margin: 0;
|
|
40
|
+
color: #fff;
|
|
41
|
+
font-size: 1.1rem;
|
|
42
|
+
line-height: 1.7;
|
|
43
|
+
overflow-wrap: anywhere;
|
|
44
|
+
white-space: pre-line;
|
|
45
|
+
}
|
|
46
|
+
.db-banner a.db-banner-link {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
margin-top: 1.75rem;
|
|
49
|
+
padding: .8rem 1.3rem;
|
|
50
|
+
border: 2px solid #fff;
|
|
51
|
+
border-radius: var(--dm-radius, .5rem);
|
|
52
|
+
background: #fff;
|
|
53
|
+
color: #152832;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
line-height: 1.4;
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
overflow-wrap: anywhere;
|
|
58
|
+
}
|
|
59
|
+
.db-banner a.db-banner-link:hover { background: #e8f1f5; color: #152832; }
|
|
60
|
+
.db-banner a.db-banner-link:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
|
|
61
|
+
.db-banner a.db-banner-link[href=""], .db-banner a.db-banner-link:not([href]), .db-banner a.db-banner-link:empty { display: none; }
|
|
62
|
+
@media (max-width: 767px) {
|
|
63
|
+
.db-banner-image { position: relative; display: block; height: 15rem; }
|
|
64
|
+
.db-banner-panel { width: 100%; min-height: 0; padding: 1.75rem; }
|
|
65
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-banner - A photo banner with a readable overlay across its left half.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Main page heading (h1; use once per page)
|
|
6
|
+
blurb - Short introduction, as plain text
|
|
7
|
+
image - Image address from your media library
|
|
8
|
+
alt - Description of the image; leave empty for a decorative photo
|
|
9
|
+
link - Optional button destination
|
|
10
|
+
label - Optional button text
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
[domma-block-banner header="A little guidance, or a helping hand." blurb="Find an answer, learn something new or get in touch." image="/media/banner.jpg" alt="People working together at a laptop" link="/contact" label="Get in touch" /]
|
|
14
|
+
-->
|
|
15
|
+
<section class="db-banner">
|
|
16
|
+
<img class="db-banner-image" src="{{image}}" alt="{{alt}}" fetchpriority="high">
|
|
17
|
+
<div class="db-banner-panel">
|
|
18
|
+
<h1 class="db-banner-heading">{{header}}</h1>
|
|
19
|
+
<p class="db-banner-blurb">{{blurb}}</p>
|
|
20
|
+
<a class="db-banner-link db-banner-btn" href="{{link}}">{{label}}</a>
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.db-contact {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
padding: clamp(1.25rem, 3vw, 2rem);
|
|
6
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5));
|
|
7
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
8
|
+
background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
9
|
+
}
|
|
10
|
+
.db-contact-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
11
|
+
.db-contact-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
12
|
+
.db-contact-blurb:empty { display: none; }
|
|
13
|
+
.db-contact-details { display: grid; gap: .75rem; margin-top: 1.5rem; font-style: normal; line-height: 1.7; }
|
|
14
|
+
.db-contact-details p, .db-contact-hours { margin: 0; white-space: pre-line; line-height: 1.7; }
|
|
15
|
+
.db-contact-hours { margin-top: 1rem; }
|
|
16
|
+
.db-contact-link { justify-self: start; }
|
|
17
|
+
.db-contact-link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
|
|
18
|
+
.db-contact-link:not([href]), .db-contact-link[href="mailto:"], .db-contact-link[href="tel:"], .db-contact-details p:empty, .db-contact-hours:empty { display: none; }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-contact - Contact details, an address and opening hours.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Introduction, as plain text
|
|
7
|
+
email - Email address
|
|
8
|
+
phone - Phone number, including country code when useful
|
|
9
|
+
address - Postal address, as plain text
|
|
10
|
+
hours - Opening hours, as plain text
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
[domma-block-contact header="Get in touch" blurb="Tell us how we can help." email="hello@example.com" phone="+44 1234 567890" address="Your business address" hours="Your opening hours" /]
|
|
14
|
+
-->
|
|
15
|
+
<section class="db-contact"><h2 class="db-contact-heading">{{header}}</h2><p class="db-contact-blurb">{{blurb}}</p><address class="db-contact-details"><a class="db-contact-link" href="mailto:{{email}}">{{email}}</a><a class="db-contact-link" href="tel:{{phone}}">{{phone}}</a><p>{{address}}</p></address><p class="db-contact-hours">{{hours}}</p></section>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
.db-cta {
|
|
2
|
+
margin-block: 1.5rem; padding: clamp(2rem, 5vw, 4rem) 1.5rem; border: 1px solid var(--dm-card-border, #d5e0e5); border-radius: var(--dm-radius-xl, 1rem); background: var(--dm-card-bg, #f4f8fa); color: var(--dm-text, #152832); text-align: center; }
|
|
3
|
+
.db-cta-heading { margin: 0 auto 1rem; max-width: 48rem; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; color: inherit; overflow-wrap: anywhere; }
|
|
4
|
+
.db-cta-blurb { margin: 0 auto; max-width: 42rem; font-size: 1.1rem; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
|
|
5
|
+
.db-cta a.db-cta-link { display: inline-block; margin-top: 1.5rem; padding: .8rem 1.25rem; border: 2px solid currentColor; border-radius: var(--dm-radius, .5rem); color: inherit; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
|
|
6
|
+
.db-cta a.db-cta-link:hover { text-decoration: underline; }
|
|
7
|
+
.db-cta a.db-cta-link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
|
|
8
|
+
.db-cta a.db-cta-link[href=""], .db-cta a.db-cta-link:not([href]), .db-cta a.db-cta-link:empty { display: none; }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-cta - A welcoming call to action using your site's theme colours.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Short invitation, as plain text
|
|
7
|
+
link - Button destination
|
|
8
|
+
label - Button text
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
[domma-block-cta header="Have something in mind?" blurb="Tell us a little about your plans." link="/contact" label="Let us help" /]
|
|
12
|
+
-->
|
|
13
|
+
<section class="db-cta">
|
|
14
|
+
<h2 class="db-cta-heading">{{header}}</h2>
|
|
15
|
+
<p class="db-cta-blurb">{{blurb}}</p>
|
|
16
|
+
<a class="db-cta-link db-cta-btn" href="{{link}}">{{label}}</a>
|
|
17
|
+
</section>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.db-faq {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
}
|
|
6
|
+
.db-faq-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
7
|
+
.db-faq-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
8
|
+
.db-faq-blurb:empty { display: none; }
|
|
9
|
+
.db-faq-list { display: grid; gap: .75rem; margin: 1.5rem 0 0; }
|
|
10
|
+
.db-faq-item { border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5)); border-radius: var(--dm-radius, .5rem); background: var(--dm-card-bg, var(--dm-surface, #f5f8fa)); }
|
|
11
|
+
.db-faq-item dt { padding: 1.25rem; font-weight: 600; line-height: 1.5; }
|
|
12
|
+
.db-faq-item dd { margin: 0; padding: 0 1.25rem 1.25rem; line-height: 1.75; white-space: pre-line; }
|
|
13
|
+
.db-faq-item:has(dt:empty) { display: none; }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-faq - Up to three questions and answers, readable without JavaScript.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Introduction, as plain text
|
|
7
|
+
question1 - Question 1
|
|
8
|
+
answer1 - Answer 1, as plain text
|
|
9
|
+
question2 - Question 2
|
|
10
|
+
answer2 - Answer 2, as plain text
|
|
11
|
+
question3 - Question 3
|
|
12
|
+
answer3 - Answer 3, as plain text
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
[domma-block-faq header="A few common questions" question1="How do we get started?" answer1="Get in touch and tell us what you have in mind." question2="Can I ask a question first?" answer2="Of course. We are happy to help." /]
|
|
16
|
+
-->
|
|
17
|
+
<section class="db-faq"><h2 class="db-faq-heading">{{header}}</h2><p class="db-faq-blurb">{{blurb}}</p><dl class="db-faq-list"><div class="db-faq-item"><dt>{{question1}}</dt><dd>{{answer1}}</dd></div><div class="db-faq-item"><dt>{{question2}}</dt><dd>{{answer2}}</dd></div><div class="db-faq-item"><dt>{{question3}}</dt><dd>{{answer3}}</dd></div></dl></section>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.db-features {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
}
|
|
6
|
+
.db-features-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
7
|
+
.db-features-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
8
|
+
.db-features-blurb:empty { display: none; }
|
|
9
|
+
.db-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
|
|
10
|
+
.db-features-card {
|
|
11
|
+
padding: clamp(1.25rem, 3vw, 2rem);
|
|
12
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5));
|
|
13
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
14
|
+
background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
15
|
+
}
|
|
16
|
+
.db-features-card h3 { margin: 0 0 .75rem; color: inherit; font-size: 1.25rem; }
|
|
17
|
+
.db-features-card p { margin: 0; line-height: 1.7; white-space: pre-line; }
|
|
18
|
+
.db-features-card:has(h3:empty) { display: none; }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-features - An introduction and up to three feature cards.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Introduction, as plain text
|
|
7
|
+
title1 - Feature 1 heading
|
|
8
|
+
text1 - Feature 1 description
|
|
9
|
+
title2 - Feature 2 heading
|
|
10
|
+
text2 - Feature 2 description
|
|
11
|
+
title3 - Feature 3 heading
|
|
12
|
+
text3 - Feature 3 description
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
[domma-block-features header="How we help" blurb="Practical support for your business." title1="Plan" text1="Find the right direction." title2="Build" text2="Bring your ideas to life." title3="Grow" text3="Keep moving forward." /]
|
|
16
|
+
-->
|
|
17
|
+
<section class="db-features"><h2 class="db-features-heading">{{header}}</h2><p class="db-features-blurb">{{blurb}}</p><div class="db-features-grid"><article class="db-features-card"><h3>{{title1}}</h3><p>{{text1}}</p></article>
|
|
18
|
+
<article class="db-features-card"><h3>{{title2}}</h3><p>{{text2}}</p></article>
|
|
19
|
+
<article class="db-features-card"><h3>{{title3}}</h3><p>{{text3}}</p></article></div></section>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.db-hero {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
padding: clamp(2rem, 6vw, 5rem) 1.25rem; text-align: center;
|
|
6
|
+
}
|
|
7
|
+
.db-hero-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
8
|
+
.db-hero-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
9
|
+
.db-hero-blurb:empty { display: none; }
|
|
10
|
+
.db-hero-heading { max-width: 54rem; margin-inline: auto; font-size: clamp(2rem, 5vw, 4rem); }
|
|
11
|
+
.db-hero-blurb { max-width: 42rem; margin-inline: auto; font-size: 1.15rem; }
|
|
12
|
+
.db-hero a.db-hero-link { display: inline-block; max-width: 100%; box-sizing: border-box; margin-top: 1.5rem; padding: .8rem 1.25rem; border: 2px solid currentColor; border-radius: var(--dm-radius, .5rem); color: inherit; font-weight: 600; text-decoration: none; line-height: 1.4; }
|
|
13
|
+
.db-hero a.db-hero-link:hover { text-decoration: underline; }
|
|
14
|
+
.db-hero a.db-hero-link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
|
|
15
|
+
.db-hero a.db-hero-link[href=""], .db-hero a.db-hero-link:not([href]), .db-hero a.db-hero-link:empty { display: none; }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-hero - A centred page introduction with an optional button.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Main page heading (h1; use once per page)
|
|
6
|
+
blurb - Short introduction, as plain text
|
|
7
|
+
link - Optional button destination
|
|
8
|
+
label - Optional button text
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
[domma-block-hero header="Welcome to your next chapter" blurb="Say what you do and who you help." link="/contact" label="Let us help" /]
|
|
12
|
+
-->
|
|
13
|
+
<section class="db-hero"><h1 class="db-hero-heading">{{header}}</h1><p class="db-hero-blurb">{{blurb}}</p><a class="db-hero-link db-hero-btn" href="{{link}}">{{label}}</a></section>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
.db-image {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
}
|
|
6
|
+
.db-image img { display: block; width: 100%; height: auto; border-radius: var(--dm-radius-xl, 1rem); }
|
|
7
|
+
.db-image figcaption { margin-top: .75rem; font-size: .95rem; line-height: 1.6; text-align: center; white-space: pre-line; }
|
|
8
|
+
.db-image img[src=""], .db-image img:not([src]), .db-image figcaption:empty { display: none; }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-image - An uncropped image with an optional caption.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
image - Image address from your Media library
|
|
6
|
+
alt - Image description; empty for a decorative image
|
|
7
|
+
caption - Optional image caption, as plain text
|
|
8
|
+
|
|
9
|
+
Example:
|
|
10
|
+
[domma-block-image image="/media/your-work.jpg" alt="Describe what visitors can see" caption="Add a little context to the image." /]
|
|
11
|
+
-->
|
|
12
|
+
<figure class="db-image"><img src="{{image}}" alt="{{alt}}" loading="lazy" decoding="async"><figcaption>{{caption}}</figcaption></figure>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.db-logos {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
text-align: center;
|
|
6
|
+
}
|
|
7
|
+
.db-logos-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
8
|
+
.db-logos-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
9
|
+
.db-logos-blurb:empty { display: none; }
|
|
10
|
+
.db-logos-heading:empty { display: none; }
|
|
11
|
+
.db-logos-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem; padding: 1.5rem; }
|
|
12
|
+
.db-logos-grid img { display: block; width: 10rem; max-width: 100%; height: 5rem; object-fit: contain; }
|
|
13
|
+
.db-logos-grid img[src=""], .db-logos-grid img:not([src]) { display: none; }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-logos - A responsive row of up to four organisation logos.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Optional heading (h2)
|
|
6
|
+
image1 - Logo 1 image address
|
|
7
|
+
alt1 - Logo 1 organisation name
|
|
8
|
+
image2 - Logo 2 image address
|
|
9
|
+
alt2 - Logo 2 organisation name
|
|
10
|
+
image3 - Logo 3 image address
|
|
11
|
+
alt3 - Logo 3 organisation name
|
|
12
|
+
image4 - Logo 4 image address
|
|
13
|
+
alt4 - Logo 4 organisation name
|
|
14
|
+
|
|
15
|
+
Example:
|
|
16
|
+
[domma-block-logos header="Who we work with" image1="/media/partner-logo.svg" alt1="Partner name" /]
|
|
17
|
+
-->
|
|
18
|
+
<section class="db-logos"><h2 class="db-logos-heading">{{header}}</h2><div class="db-logos-grid"><img src="{{image1}}" alt="{{alt1}}" loading="lazy" decoding="async"><img src="{{image2}}" alt="{{alt2}}" loading="lazy" decoding="async"><img src="{{image3}}" alt="{{alt3}}" loading="lazy" decoding="async"><img src="{{image4}}" alt="{{alt4}}" loading="lazy" decoding="async"></div></section>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.db-price {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
padding: clamp(1.25rem, 3vw, 2rem);
|
|
6
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5));
|
|
7
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
8
|
+
background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
9
|
+
}
|
|
10
|
+
.db-price-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
11
|
+
.db-price-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
12
|
+
.db-price-blurb:empty { display: none; }
|
|
13
|
+
.db-price-heading { font-size: 1.4rem; }
|
|
14
|
+
.db-price-amount { margin: 0 0 .5rem; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; }
|
|
15
|
+
.db-price-period { margin: 0 0 1.5rem; line-height: 1.6; }
|
|
16
|
+
.db-price-period:empty { display: none; }
|
|
17
|
+
.db-price a.db-price-link { display: inline-block; max-width: 100%; box-sizing: border-box; margin-top: 1.5rem; padding: .8rem 1.25rem; border: 2px solid currentColor; border-radius: var(--dm-radius, .5rem); color: inherit; font-weight: 600; text-decoration: none; line-height: 1.4; }
|
|
18
|
+
.db-price a.db-price-link:hover { text-decoration: underline; }
|
|
19
|
+
.db-price a.db-price-link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
|
|
20
|
+
.db-price a.db-price-link[href=""], .db-price a.db-price-link:not([href]), .db-price a.db-price-link:empty { display: none; }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-pricing-card - A clear price or package card with an optional enquiry button.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Package heading (h3)
|
|
6
|
+
blurb - What is included, as plain text
|
|
7
|
+
price - Price text, including currency and any tax wording
|
|
8
|
+
period - Optional billing period or pricing note
|
|
9
|
+
link - Optional button destination
|
|
10
|
+
label - Optional button text
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
[domma-block-pricing-card header="Your package" price="Ask for a quote" blurb="Describe exactly what is included." link="/contact" label="Talk it through" /]
|
|
14
|
+
-->
|
|
15
|
+
<article class="db-price"><h3 class="db-price-heading">{{header}}</h3><p class="db-price-amount">{{price}}</p><p class="db-price-period">{{period}}</p><p class="db-price-blurb">{{blurb}}</p><a class="db-price-link db-price-btn" href="{{link}}">{{label}}</a></article>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.db-service {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
overflow: hidden; border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5)); border-radius: var(--dm-radius-xl, 1rem); background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
6
|
+
}
|
|
7
|
+
.db-service-image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
|
|
8
|
+
.db-service-image[src=""], .db-service-image:not([src]) { display: none; }
|
|
9
|
+
.db-service-body { padding: 1.5rem; }
|
|
10
|
+
.db-service-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
11
|
+
.db-service-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
12
|
+
.db-service-blurb:empty { display: none; }
|
|
13
|
+
.db-service-heading { font-size: 1.4rem; }
|
|
14
|
+
.db-service a.db-service-link { display: inline-block; max-width: 100%; box-sizing: border-box; margin-top: 1.5rem; padding: .8rem 1.25rem; border: 2px solid currentColor; border-radius: var(--dm-radius, .5rem); color: inherit; font-weight: 600; text-decoration: none; line-height: 1.4; }
|
|
15
|
+
.db-service a.db-service-link:hover { text-decoration: underline; }
|
|
16
|
+
.db-service a.db-service-link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
|
|
17
|
+
.db-service a.db-service-link[href=""], .db-service a.db-service-link:not([href]), .db-service a.db-service-link:empty { display: none; }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-service-card - A reusable service card with an optional photo and button.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Card heading (h3)
|
|
6
|
+
blurb - Service description, as plain text
|
|
7
|
+
image - Image address from your Media library
|
|
8
|
+
alt - Image description; empty for a decorative image
|
|
9
|
+
link - Optional button destination
|
|
10
|
+
label - Optional button text
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
[domma-block-service-card header="Your service" blurb="Explain the benefit in a sentence or two." link="/services" label="Find out more" /]
|
|
14
|
+
-->
|
|
15
|
+
<article class="db-service"><img class="db-service-image" src="{{image}}" alt="{{alt}}" loading="lazy" decoding="async"><div class="db-service-body"><h3 class="db-service-heading">{{header}}</h3><p class="db-service-blurb">{{blurb}}</p><a class="db-service-link db-service-btn" href="{{link}}">{{label}}</a></div></article>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.db-split {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: clamp(1.5rem, 4vw, 3.5rem);
|
|
7
|
+
color: var(--dm-text, #152832);
|
|
8
|
+
}
|
|
9
|
+
.db-split-image {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
aspect-ratio: 4 / 3;
|
|
13
|
+
object-fit: cover;
|
|
14
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
15
|
+
}
|
|
16
|
+
.db-split-image[src=""], .db-split-image:not([src]) { display: none; }
|
|
17
|
+
.db-split-body { min-width: 0; padding: .5rem 0; }
|
|
18
|
+
.db-split-heading { margin: 0 0 1rem; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; color: inherit; overflow-wrap: anywhere; }
|
|
19
|
+
.db-split-blurb { margin: 0; font-size: 1.1rem; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
|
|
20
|
+
.db-split a.db-split-link { display: inline-block; margin-top: 1.5rem; padding: .8rem 1.25rem; border: 2px solid currentColor; border-radius: var(--dm-radius, .5rem); color: inherit; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
|
|
21
|
+
.db-split a.db-split-link:hover { text-decoration: underline; }
|
|
22
|
+
.db-split a.db-split-link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
|
|
23
|
+
.db-split a.db-split-link[href=""], .db-split a.db-split-link:not([href]), .db-split a.db-split-link:empty { display: none; }
|
|
24
|
+
@media (max-width: 767px) {
|
|
25
|
+
.db-split { grid-template-columns: minmax(0, 1fr); }
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-split - A simple image and text section that stacks on phones.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Section introduction, as plain text
|
|
7
|
+
image - Image address from your media library
|
|
8
|
+
alt - Description of the image
|
|
9
|
+
link - Optional button destination
|
|
10
|
+
label - Optional button text
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
[domma-block-split header="Made for your business" blurb="Tell visitors how you can help." image="/media/about.jpg" alt="Our workspace" link="/about" label="Meet us" /]
|
|
14
|
+
-->
|
|
15
|
+
<section class="db-split">
|
|
16
|
+
<img class="db-split-image" src="{{image}}" alt="{{alt}}" loading="lazy" decoding="async">
|
|
17
|
+
<div class="db-split-body">
|
|
18
|
+
<h2 class="db-split-heading">{{header}}</h2>
|
|
19
|
+
<p class="db-split-blurb">{{blurb}}</p>
|
|
20
|
+
<a class="db-split-link db-split-btn" href="{{link}}">{{label}}</a>
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.db-stats {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
text-align: center;
|
|
6
|
+
}
|
|
7
|
+
.db-stats-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
8
|
+
.db-stats-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
9
|
+
.db-stats-blurb:empty { display: none; }
|
|
10
|
+
.db-stats-heading:empty { display: none; }
|
|
11
|
+
.db-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.25rem; margin: 0; }
|
|
12
|
+
.db-stats-item { display: flex; flex-direction: column; gap: .5rem;
|
|
13
|
+
padding: clamp(1.25rem, 3vw, 2rem);
|
|
14
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5));
|
|
15
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
16
|
+
background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
17
|
+
}
|
|
18
|
+
.db-stats-item dt { order: 2; font-weight: 400; line-height: 1.6; }
|
|
19
|
+
.db-stats-item dd { order: 1; margin: 0; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; }
|
|
20
|
+
.db-stats-item:has(dd:empty) { display: none; }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-stats - Up to three useful figures with clear labels.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Optional section heading (h2)
|
|
6
|
+
value1 - Figure 1, including any unit
|
|
7
|
+
label1 - Figure 1 explanation
|
|
8
|
+
value2 - Figure 2, including any unit
|
|
9
|
+
label2 - Figure 2 explanation
|
|
10
|
+
value3 - Figure 3, including any unit
|
|
11
|
+
label3 - Figure 3 explanation
|
|
12
|
+
|
|
13
|
+
Example:
|
|
14
|
+
[domma-block-stats header="A few useful facts" value1="Your figure" label1="Explain what it represents" /]
|
|
15
|
+
-->
|
|
16
|
+
<section class="db-stats"><h2 class="db-stats-heading">{{header}}</h2><dl class="db-stats-grid"><div class="db-stats-item"><dt>{{label1}}</dt><dd>{{value1}}</dd></div><div class="db-stats-item"><dt>{{label2}}</dt><dd>{{value2}}</dd></div><div class="db-stats-item"><dt>{{label3}}</dt><dd>{{value3}}</dd></div></dl></section>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.db-steps {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
}
|
|
6
|
+
.db-steps-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
7
|
+
.db-steps-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
8
|
+
.db-steps-blurb:empty { display: none; }
|
|
9
|
+
.db-steps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.25rem; counter-reset: db-step; list-style: none; margin: 1.5rem 0 0; padding: 0; }
|
|
10
|
+
.db-steps-item { counter-increment: db-step;
|
|
11
|
+
padding: clamp(1.25rem, 3vw, 2rem);
|
|
12
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5));
|
|
13
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
14
|
+
background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
15
|
+
}
|
|
16
|
+
.db-steps-item::before { content: counter(db-step, decimal-leading-zero); display: block; margin-bottom: 1rem; font-size: 1.75rem; font-weight: 700; }
|
|
17
|
+
.db-steps-item h3 { margin: 0 0 .75rem; color: inherit; font-size: 1.25rem; }
|
|
18
|
+
.db-steps-item p { margin: 0; line-height: 1.7; white-space: pre-line; }
|
|
19
|
+
.db-steps-item:has(h3:empty) { display: none; }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-steps - A clear, numbered process with up to three steps.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Introduction, as plain text
|
|
7
|
+
title1 - Step 1 heading
|
|
8
|
+
text1 - Step 1 description
|
|
9
|
+
title2 - Step 2 heading
|
|
10
|
+
text2 - Step 2 description
|
|
11
|
+
title3 - Step 3 heading
|
|
12
|
+
text3 - Step 3 description
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
[domma-block-steps header="Getting started" blurb="A simple way forward." title1="Say hello" text1="Tell us what you need." title2="Make a plan" text2="Agree the details together." title3="Get going" text3="Put your plan into action." /]
|
|
16
|
+
-->
|
|
17
|
+
<section class="db-steps"><h2 class="db-steps-heading">{{header}}</h2><p class="db-steps-blurb">{{blurb}}</p><ol class="db-steps-list"><li class="db-steps-item"><h3>{{title1}}</h3><p>{{text1}}</p></li><li class="db-steps-item"><h3>{{title2}}</h3><p>{{text2}}</p></li><li class="db-steps-item"><h3>{{title3}}</h3><p>{{text3}}</p></li></ol></section>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.db-team {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5)); border-radius: var(--dm-radius-xl, 1rem); overflow: hidden; background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
6
|
+
}
|
|
7
|
+
.db-team-image { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
|
|
8
|
+
.db-team-image[src=""], .db-team-image:not([src]) { display: none; }
|
|
9
|
+
.db-team-body { padding: 1.5rem; }
|
|
10
|
+
.db-team-name { margin: 0 0 .5rem; font-size: 1.4rem; color: inherit; }
|
|
11
|
+
.db-team-role { margin: 0 0 1rem; font-weight: 600; }
|
|
12
|
+
.db-team-blurb { margin: 0; white-space: pre-line; line-height: 1.7; }
|
|
13
|
+
.db-team-role:empty, .db-team-blurb:empty { display: none; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-team-card - A team member photo, role and short introduction.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
name - Person name (h3)
|
|
6
|
+
role - Role or specialism
|
|
7
|
+
blurb - Short introduction, as plain text
|
|
8
|
+
image - Image address from your Media library
|
|
9
|
+
alt - Image description; empty for a decorative image
|
|
10
|
+
|
|
11
|
+
Example:
|
|
12
|
+
[domma-block-team-card name="Team member" role="Role or specialism" blurb="A short, friendly introduction." image="/media/team-member.jpg" alt="Portrait of your team member" /]
|
|
13
|
+
-->
|
|
14
|
+
<article class="db-team"><img class="db-team-image" src="{{image}}" alt="{{alt}}" loading="lazy" decoding="async"><div class="db-team-body"><h3 class="db-team-name">{{name}}</h3><p class="db-team-role">{{role}}</p><p class="db-team-blurb">{{blurb}}</p></div></article>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.db-testimonial {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
padding: clamp(1.25rem, 3vw, 2rem);
|
|
6
|
+
border: 1px solid var(--dm-card-border, var(--dm-border, #d5e0e5));
|
|
7
|
+
border-radius: var(--dm-radius-xl, 1rem);
|
|
8
|
+
background: var(--dm-card-bg, var(--dm-surface, #f5f8fa));
|
|
9
|
+
}
|
|
10
|
+
.db-testimonial-quote { margin: 0; padding: 0; border: 0; color: inherit; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.65; white-space: pre-line; }
|
|
11
|
+
.db-testimonial-attribution { display: grid; gap: .3rem; margin-top: 1.25rem; }
|
|
12
|
+
.db-testimonial-attribution span { font-size: .95rem; }
|
|
13
|
+
.db-testimonial-attribution strong:empty, .db-testimonial-attribution span:empty, .db-testimonial-attribution:has(strong:empty):has(span:empty) { display: none; }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-testimonial - A customer quotation with an optional attribution.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
quote - An approved customer quotation, as plain text
|
|
6
|
+
name - Customer name
|
|
7
|
+
detail - Optional role or business
|
|
8
|
+
|
|
9
|
+
Example:
|
|
10
|
+
[domma-block-testimonial quote="Replace this with a customer quotation you have permission to share." name="Customer name" detail="Business or role" /]
|
|
11
|
+
-->
|
|
12
|
+
<figure class="db-testimonial"><blockquote class="db-testimonial-quote">{{quote}}</blockquote><figcaption class="db-testimonial-attribution"><strong>{{name}}</strong><span>{{detail}}</span></figcaption></figure>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
.db-text {
|
|
2
|
+
margin-block: 1.5rem;
|
|
3
|
+
color: var(--dm-text, #152832);
|
|
4
|
+
overflow-wrap: anywhere;
|
|
5
|
+
max-width: 48rem; margin-inline: auto; padding-block: 1rem;
|
|
6
|
+
}
|
|
7
|
+
.db-text-heading { margin: 0 0 1rem; color: inherit; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
|
|
8
|
+
.db-text-blurb { margin: 0; line-height: 1.75; white-space: pre-line; }
|
|
9
|
+
.db-text-blurb:empty { display: none; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
domma-block-text - A readable text section for your story or an introduction.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
header - Section heading (h2)
|
|
6
|
+
blurb - Introduction, as plain text
|
|
7
|
+
|
|
8
|
+
Example:
|
|
9
|
+
[domma-block-text header="Our story" blurb="Share a little about your business and the people behind it." /]
|
|
10
|
+
-->
|
|
11
|
+
<section class="db-text"><h2 class="db-text-heading">{{header}}</h2><p class="db-text-blurb">{{blurb}}</p></section>
|
|
@@ -7,6 +7,7 @@ import fs from 'fs/promises';
|
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import {fileURLToPath} from 'url';
|
|
9
9
|
import * as cache from './cache/index.js';
|
|
10
|
+
import {seedStarterBlocks} from './starter-blocks.js';
|
|
10
11
|
|
|
11
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
13
|
const BLOCKS_DIR = path.resolve(__dirname, '../../content/blocks');
|
|
@@ -427,6 +428,7 @@ export async function deleteBlock(name) {
|
|
|
427
428
|
* Skips any file that already exists to preserve user customisations.
|
|
428
429
|
*/
|
|
429
430
|
export async function seedDefaultBlocks() {
|
|
431
|
+
await seedStarterBlocks(BLOCKS_DIR);
|
|
430
432
|
for (const [name, content] of Object.entries(BLOCKS)) {
|
|
431
433
|
await seedBlock(name, content);
|
|
432
434
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Editable starting points for new pages, copied without replacing site edits. */
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import {fileURLToPath} from 'node:url';
|
|
5
|
+
|
|
6
|
+
const sourceDir = fileURLToPath(new URL('../blocks/', import.meta.url));
|
|
7
|
+
|
|
8
|
+
export async function seedStarterBlocks(destination) {
|
|
9
|
+
await fs.mkdir(destination, {recursive: true});
|
|
10
|
+
for (const name of await fs.readdir(sourceDir)) {
|
|
11
|
+
if (!/^domma-block-[a-z-]+\.(html|css|meta\.json)$/.test(name)) continue;
|
|
12
|
+
try {
|
|
13
|
+
await fs.copyFile(path.join(sourceDir, name), path.join(destination, name), fs.constants.COPYFILE_EXCL);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
if (error.code !== 'EEXIST') throw error;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|