@@ -11,37 +11,43 @@ myst:
1111
1212# Classic UI theming based on Barceloneta
1313
14+ This chapter describes how to create a custom theme for Plone Classic UI based on Barceloneta.
1415Barceloneta is the default enabled theme for Plone Classic UI.
1516
1617
17- (classic-ui-theming-barceloneta-theme-package -label)=
18+ (classic-ui-theming-barceloneta-pre-requisites -label)=
1819
19- ## Create a Classic UI theme addon package
20+ ## Pre-requisites
2021
21- To create a addon package with a theme you need:
22+ To create an add-on package with a Plone Classic UI theme, you need to install the following pre-requisites.
2223
23- - [ Node.js (16/18)] ( https://nodejs.org/en )
24- - [ Python (>=3.8)] ( https://www.python.org/ )
25- - [ plonecli] ( https://pypi.org/project/plonecli/ )
24+ - [ Node.js (16/18)] ( https://nodejs.org/en )
25+ - [ Python (>=3.8)] ( https://www.python.org/ )
26+ - [ plonecli] ( https://pypi.org/project/plonecli/ )
2627
27- Read more about package installation in [ Install Plone from its packages ] ( ../../ install/install-from-packages)
28+ Read more about how to install pre-requisites in {doc} ` / install/install-from-packages` .
2829
29- Create a Classic UI theme addon:
30+
31+ (classic-ui-theming-barceloneta-create-a-classic-ui-theme-add-on-package-label)=
32+
33+ ## Create a Classic UI theme add-on package
34+
35+ To create a Classic UI theme add-on, begin with the following command.
3036
3137``` shell
3238plonecli create addon plonetheme.themebasedonbarceloneta
3339```
3440
35- Then change the working directory into the created package and add the basic theme structure:
41+ Then change the working directory into the package you just created, and add the basic theme structure with the following commands.
3642
3743``` shell
3844cd plonetheme.themebasedonbarceloneta
3945plonecli add theme_barceloneta
4046```
4147
42- Give your theme a name and optionally commit the changes.
43- After that the theming structure is set up and ready for customization.
44- You can create a Plone Site and install your theme addon in the controlpanel.
48+ Give your theme a name, and optionally commit the changes.
49+ After that, the theming structure is set up and ready for customization.
50+ You can create a Plone Site and install your theme add-on in the controlpanel.
4551
4652
4753(classic-ui-theming-barceloneta-theme-structure-label)=
@@ -85,8 +91,7 @@ All the theming relevant files are now located inside `src/plonetheme/themebased
8591: Basic theme configuration for the backend.
8692
8793` package.json `
88- : npm package configuration which defines all requirements for theming
89- with barceloneta.
94+ : npm package configuration which defines all requirements for theming with barceloneta.
9095
9196` rules.xml `
9297: Diazo rules which translate the ` index.html ` and fills it with content from the backend.
@@ -102,8 +107,8 @@ All the theming relevant files are now located inside `src/plonetheme/themebased
102107
103108` scss/theme.scss `
104109: Base theme file which follows "Option B" of customizing Bootstrap imports to enable custom variable and map injections.
105- Note that the order of these imports is mandatory to ensure overriding the defaults.
106- See https://getbootstrap.com/docs/5.3/customize/sass/#importing
110+ Note that the order of these imports is mandatory to ensure overriding the defaults.
111+ See https://getbootstrap.com/docs/5.3/customize/sass/#importing .
107112
108113` styles/theme.css[.min] `
109114: Compiled CSS styles.
@@ -116,15 +121,15 @@ See https://getbootstrap.com/docs/5.3/customize/sass/#importing
116121
117122## Compiling theme resources
118123
119- To compile the SCSS code you have to install the required dependencies with ` npm ` .
124+ To compile the SCSS code, you have to install the required dependencies with ` npm ` .
120125Then run the package script ` build ` inside the ` theme/ ` folder:
121126
122127``` shell
123128npm install
124129npm run build
125130```
126131
127- During theme development you can run:
132+ During theme development, you can run:
128133
129134``` shell
130135npm run watch
@@ -139,7 +144,7 @@ You can preview your changes when you reload your browser.
139144## Customize Bootstrap and Barceloneta components
140145
141146The base ` scss/theme.scss ` file provides all imports of the dependent Bootstrap and Barceloneta resources to build the default Classic UI theme.
142- As a convenience ` bobtemplates.plone ` has created three files to customize variables, maps and custom SCSS code.
147+ As a convenience ` bobtemplates.plone ` has created three files to customize variables, maps, and custom SCSS code.
143148
144149``` text
145150scss/_custom.scss
@@ -194,7 +199,7 @@ If you have a custom workflow state, you can add your state color to the default
194199
195200``` scss
196201$custom-state-colors : (
197- " my-custom-state-id" : " #ff0000" ;
202+ " my-custom-state-id" : " #ff0000"
198203);
199204
200205// Merge the maps
0 commit comments