domma-cms 1.63.0 → 1.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/CLAUDE.md +6 -1
- package/admin/css/admin.css +1 -1
- package/admin/js/lib/background-builder.js +24 -0
- package/admin/js/lib/code-format.js +1 -1
- package/admin/js/lib/shortcode-form.js +3 -3
- package/admin/js/lib/shortcode-registry.js +6 -4
- package/admin/js/lib/shortcode-tags.js +1 -1
- package/admin/js/lib/theme-settings-arrange.js +1 -1
- package/admin/js/templates/docs/usage-shortcodes.html +5 -1
- package/admin/js/templates/theme.html +7 -0
- package/admin/js/views/theme.js +4 -4
- package/docs/markdown-shortcodes.md +55 -3
- package/docs/screenshots/background-designer.png +0 -0
- package/docs/screenshots/background-nested-layout-desktop.png +0 -0
- package/docs/screenshots/background-nested-layout-mobile.png +0 -0
- package/docs/theming.md +17 -0
- package/package.json +1 -1
- package/public/css/site.css +1 -1
- package/public/js/background-style.mjs +1 -0
- package/server/services/block-slots.js +1 -1
- package/server/services/content.js +5 -5
- package/server/services/markdown.js +79 -76
- package/server/services/renderer.js +5 -3
- package/server/services/themeSettings.js +4 -0
- package/server/templates/page.html +1 -1
|
@@ -252,10 +252,63 @@ A header is never drawn: `title`, `subtitle`, `icon`, `image` and `layout` are i
|
|
|
252
252
|
|
|
253
253
|
---
|
|
254
254
|
|
|
255
|
+
## `[background]`
|
|
256
|
+
|
|
257
|
+
Set the page backdrop with a bare or self-closing tag, anywhere in the page body:
|
|
258
|
+
|
|
259
|
+
```text
|
|
260
|
+
[background preset="lavender-haze" /]
|
|
261
|
+
[background color="#f6f4fc" /]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
A page background overrides **Content > Theme > Site background**. Remove the page tag to inherit the
|
|
265
|
+
site default again. With no site background configured, the selected theme supplies its normal background.
|
|
266
|
+
The last valid page background tag wins. Tags in code examples and comments do not affect the page.
|
|
267
|
+
|
|
268
|
+
Use an opening and closing pair for a section. Sections can nest and contain grids, cards and columns:
|
|
269
|
+
|
|
270
|
+
```text
|
|
271
|
+
[background preset="lavender-haze"]
|
|
272
|
+
[card title="Services"]
|
|
273
|
+
[grid cols="2" gap="3"]
|
|
274
|
+
[card title="Consulting"]First service.[/card]
|
|
275
|
+
[card title="Development"]Second service.[/card]
|
|
276
|
+
[/grid]
|
|
277
|
+
[/card]
|
|
278
|
+
[/background]
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
In the Page Editor choose **Insert > Layout > Background**, or right-click a background tag and choose
|
|
282
|
+
**Edit Background**. The slideover offers preset swatches, colour pickers, a live preview and page/section
|
|
283
|
+
scope. Selecting content before insertion starts a section around that content. Editing a tag preserves its
|
|
284
|
+
existing body, including nested grids and cards.
|
|
285
|
+
|
|
286
|
+
| Attribute | Values / purpose |
|
|
287
|
+
|---|---|
|
|
288
|
+
| `preset` | `lavender-haze`, `aurora`, `peach-mist`, `ocean`, `sunset`, `spotlight` |
|
|
289
|
+
| `type` | `solid`, `linear`, `radial`, `glow` |
|
|
290
|
+
| `color` | Base hex colour or theme name: `background`, `surface`, `primary`, `secondary`, `success`, `info`, `warning`, `danger` |
|
|
291
|
+
| `colors` | Two to four comma-separated colours; optional stop positions, such as `#41345b 0%,#a8d4e3 65%,#fff 100%` |
|
|
292
|
+
| `angle` | Linear gradient angle in degrees, 0-360 |
|
|
293
|
+
| `x`, `y` | Radial focal position, or the first glow's position, in percent, 0-100; the second glow mirrors `x` |
|
|
294
|
+
| `spread` | Radial/glow spread, 10-150 percent |
|
|
295
|
+
| `strength` | Glow colour strength, 0-100 percent |
|
|
296
|
+
|
|
297
|
+
Preset attributes can be overridden individually, for example `[background preset="lavender-haze" strength="60" /]`.
|
|
298
|
+
Soft glow uses the first two colours. These are static CSS gradients with no image download or animation.
|
|
299
|
+
Backgrounds preserve the page's text colours; choose a preset that suits the active theme and check the preview.
|
|
300
|
+
Custom site CSS retains precedence. Section backgrounds stay within the width of their parent and add responsive padding.
|
|
301
|
+
|
|
255
302
|
## `[grid]` / `[row]` with `[col]`
|
|
256
303
|
|
|
257
304
|
Lay out content in multi-column grids using Domma's native CSS Grid system.
|
|
258
305
|
|
|
306
|
+
Grids, rows and columns can nest, including `[grid]` inside another `[grid]`. Each grid keeps its own
|
|
307
|
+
columns, gap, responsive stacking and IDs. Cards can sit inside a grid inside another card, directly or
|
|
308
|
+
inside `[col]`. Keep closing tags in reverse opening order. Use the editor's attribute form on the desired
|
|
309
|
+
opening tag to edit that container independently. Balanced structural nesting is supported to 64 levels.
|
|
310
|
+
|
|
311
|
+
|
|
259
312
|
### Grid (explicit column count)
|
|
260
313
|
|
|
261
314
|
```
|
|
@@ -1848,7 +1901,7 @@ nesting behaviour:
|
|
|
1848
1901
|
28. `[button]`
|
|
1849
1902
|
29. `[link]`
|
|
1850
1903
|
30. `[cta]`
|
|
1851
|
-
31. `[grid]` / `[row]` / `[col]`
|
|
1904
|
+
31. `[background]` sections / `[grid]` / `[row]` / `[col]`
|
|
1852
1905
|
32. `[card]` / `[box]`
|
|
1853
1906
|
33. `[banner]`
|
|
1854
1907
|
34. `[slideover]`
|
|
@@ -1862,8 +1915,7 @@ Container tags render their own bodies as they go: effect wrappers, `[tabs]`, `[
|
|
|
1862
1915
|
all of them. `[center]` leaves its body as Markdown for the later stages, so anything processed after it works
|
|
1863
1916
|
inside it. Tags processed before a container (components, collections, views, blocks, menus) are already HTML by
|
|
1864
1917
|
the time the container sees them, so they can be nested anywhere. `[banner]` runs after `[card]` and `[grid]`, so
|
|
1865
|
-
it cannot be nested inside a container that has already rendered its body. Do not nest `[slideover]` inside another `[slideover]
|
|
1866
|
-
inside another `[box]`.
|
|
1918
|
+
it cannot be nested inside a container that has already rendered its body. Do not nest `[slideover]` inside another `[slideover]`. Cards, boxes, grids, rows, columns and background sections support balanced nesting.
|
|
1867
1919
|
|
|
1868
1920
|
### Optional Christmas elf scenes
|
|
1869
1921
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/theming.md
CHANGED
|
@@ -52,6 +52,23 @@ migration lifts it out on first boot after upgrading, and the old keys are still
|
|
|
52
52
|
save so plugins and fleet tooling that read them keep working. `theme.json` is the authoritative copy -
|
|
53
53
|
editing the mirrored keys in `site.json` by hand has no effect.
|
|
54
54
|
|
|
55
|
+
### Site backgrounds
|
|
56
|
+
|
|
57
|
+
**Content > Theme > Site background > Choose background** opens the shared background designer.
|
|
58
|
+
Pick a solid colour, linear/radial gradient or soft glow, starting from the same presets as the Page Editor.
|
|
59
|
+
Apply returns the choice to Theme settings; **Save** makes it live. Discard restores the previous choice.
|
|
60
|
+
**Use theme background** clears the custom backdrop after saving.
|
|
61
|
+
|
|
62
|
+
The choice is stored as `background` in `config/theme.json`, for example:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{"background": {"preset": "lavender-haze"}}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This default applies to public pages and plugin/blog page shells. A page's singleton `[background ... /]`
|
|
69
|
+
tag overrides it. Paired `[background]...[/background]` tags paint individual sections. Site CSS can override
|
|
70
|
+
the generated declarations. Backgrounds leave text colours unchanged, so check light and dark theme combinations.
|
|
71
|
+
|
|
55
72
|
### Via `config/theme.json` directly
|
|
56
73
|
|
|
57
74
|
```json
|