Skip to content

Commit 2d96333

Browse files
authored
Merge pull request #1677 from plone/merge-1275-bits
Merge PR #1275 useful bits
2 parents 329ed93 + 5e3c3bc commit 2d96333

File tree

4 files changed

+57
-23
lines changed

4 files changed

+57
-23
lines changed

docs/classic-ui/mockup.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,39 @@ myst:
33
html_meta:
44
"description": "Mockup together with Patternslib are used to build the UI toolkit for Classic UI, a frontend for Plone."
55
"property=og:description": "Mockup together with Patternslib are used to build the UI toolkit for Classic UI, a frontend for Plone."
6-
"property=og:title": "Mockup"
7-
"keywords": "Mockup, Patternslib, Classic UI, frontend, Plone"
6+
"property=og:title": "Mockup and Patternslib"
7+
"keywords": "Mockup, Patternslib, Classic UI, plonecli, bobtemplates.plone, mr.bob, frontend, Plone"
88
---
99

10-
(mockup-label)=
10+
(mockup-and-patternslib-label)=
1111

12-
# Mockup
12+
# Mockup and Patternslib
1313

1414
{term}`Mockup` together with {term}`Patternslib` are used to build the UI toolkit for {term}`Classic UI`, a frontend for Plone.
1515

1616
View the [interactive documentation of Mockup](https://plone.github.io/mockup/).
1717

18-
For more information, visit the [Mockup repository on GitHub](https://github.com/plone/mockup).
18+
19+
## Get started
20+
21+
[bobtemplates.plone](https://github.com/plone/bobtemplates.plone) provides [mr.bob](https://mrbob.readthedocs.io/en/latest/) templates to generate packages for Plone projects.
22+
[plonecli](https://github.com/plone/plonecli) provides a command line client for bobtemplates.plone.
23+
24+
Install plonecli into your Python user packages to make it available to all your projects.
25+
26+
```shell
27+
pip install plonecli --user
28+
```
29+
30+
Create a theme package add-on with {term}`plonecli`.
31+
32+
```shell
33+
plonecli add mockup_pattern
34+
```
35+
36+
37+
## References
38+
39+
- {ref}`v60-mockup-resource-registry-label` in Plone 6.0
40+
- [Mockup repository on GitHub](https://github.com/plone/mockup)
41+
- [Patternslib](https://patternslib.com/)

docs/classic-ui/module-federation.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ const package_json_patternslib = require("@patternslib/patternslib/package.json"
5959
Then find the following line.
6060

6161
```js
62-
config = patternslib_config(env, argv, config, ["@plone/mockup"]);
62+
config = patternslib_config(env, argv, config, ["@plone/mockup"]);
6363
```
6464

6565
Below this line add the following.
6666

6767
```js
68-
config.plugins.push(
69-
mf_config({
70-
name: "myaddon",
71-
filename: "myaddon-remote.min.js",
72-
remote_entry: config.entry["myaddon.min"],
73-
dependencies: {
74-
...package_json_patternslib.dependencies,
75-
...package_json_mockup.dependencies,
76-
...package_json.dependencies,
77-
},
78-
})
79-
);
68+
config.plugins.push(
69+
mf_config({
70+
name: "myaddon",
71+
filename: "myaddon-remote.min.js",
72+
remote_entry: config.entry["myaddon.min"],
73+
dependencies: {
74+
...package_json_patternslib.dependencies,
75+
...package_json_mockup.dependencies,
76+
...package_json.dependencies,
77+
},
78+
})
79+
);
8080
```
8181

8282
Replace the name `myaddon` with your add-on bundle's unique name.
@@ -93,7 +93,7 @@ To preserve compatibility with older add-ons and JavaScript implementations, the
9393
Constructs like the following still work:
9494

9595
```js
96-
(function($) {
97-
// JS code which uses $
98-
})(jQuery);
96+
(function($) {
97+
// JS code which uses $
98+
})(jQuery);
9999
```

docs/classic-ui/static-resources.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ myst:
1414
We often want to ship a website with a static resource, such as an image, icon, CSS, or JavaScript file.
1515
For this, we need to register static resources.
1616

17+
```{seealso}
18+
For some additional implementation information, see {ref}`classic-ui-theming-from-scratch-theme-label`.
19+
```
20+
1721

1822
(classic-ui-static-resources-registering-label)=
1923

@@ -96,4 +100,4 @@ The following attributes are available for registering a static resource:
96100

97101
## Loading order of resources
98102

99-
`depends` is used to define the loading order of resources, by specifying the name of the depending bundle.
103+
`depends` is used to define the loading order of resources by specifying the name of the depending bundle.

docs/classic-ui/theming/from-scratch.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Theming based on a filesystem package without any dependency.
2525
- No Diazo needed
2626

2727

28+
(classic-ui-theming-from-scratch-package-label)=
29+
2830
## Theme package
2931

3032
- Create a theme package as explained here.
@@ -33,6 +35,8 @@ Theming based on a filesystem package without any dependency.
3335
- Static files
3436

3537

38+
(classic-ui-theming-from-scratch-static-files-label)=
39+
3640
## Static files
3741

3842
Register directory to keep static files
@@ -49,6 +53,9 @@ Directory: `src/plonetheme/munich/browser/static`
4953
/>
5054
```
5155

56+
57+
(classic-ui-theming-from-scratch-theme-label)=
58+
5259
## Theme
5360

5461
### Manifest
@@ -161,7 +168,7 @@ To do so, follow this guide.
161168
- Add a script in {file}`package.json` to compile the CSS.
162169

163170
```json
164-
"css-compile-main": "sass --load-path=node_modules --style expanded --source-map --embed-sources --no-error-css plone.scss:../static/plone.css"
171+
"css-compile-main": "sass --load-path=node_modules --style expanded --source-map --embed-sources --no-error-css plone.scss:../static/plone.css"
165172
```
166173

167174
```{tip}

0 commit comments

Comments
 (0)