Skip to content

Commit 0265919

Browse files
committed
Clean up English and MyST syntax and grammar
1 parent 5df1d66 commit 0265919

File tree

1 file changed

+68
-70
lines changed

1 file changed

+68
-70
lines changed

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

Lines changed: 68 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -122,89 +122,87 @@ yarn dist
122122
- Tweak basic settings like rounded corners, shadows, and so on.
123123
- Set custom fonts
124124
- Define your own stuff
125-
- Import Boostrap (as basis)
125+
- Import Bootstrap (as basis)
126126

127127

128128
#### Minimal backend styling
129129

130-
When creating a theme from scratch, it still makes sense (and saves time) to reuse the barceloneta theme for:
131-
132-
- Plone toolbar
133-
- add/edit forms
134-
- control panels
135-
136-
To be able to do so:
137-
138-
- create a new CSS file on your theme like this:
139-
140-
```scss
141-
// plone variables (used in toolbar)
142-
// Plone specific colors
143-
//colors
144-
$state-draft-color: #fab82a!default; // lime-yellow //draft is visible
145-
$state-pending-color: #e2e721!default; // orange
146-
$state-private-color: #c4183c!default; // red
147-
$state-internal-color: #fab82a!default; // is draft
148-
$state-internally-published-color: #883dfa!default; // is intranet
149-
$plone-link-color: #007bb1!default; //plone blue made slightly darker for wcag 2.0
150-
$spacer: 1rem!default;
151-
152-
// Toolbar
153-
$plone-toolbar-bg: rgba(0, 0, 0, 0.9);
154-
$plone-toolbar-submenu-bg: rgba(20, 20, 20, 0.95);
155-
$plone-toolbar-font-primary: "Roboto Condensed", sans-serif;
156-
$plone-toolbar-font-secondary: "Roboto", sans-serif;
157-
$plone-toolbar-separator-color: rgba(255, 255, 255, 0.17);
158-
$plone-toolbar-link: $plone-link-color;
159-
$plone-toolbar-text-color: rgba(255, 255, 255, 0.9);
160-
$plone-toolbar-submenu-text-color: #fff;
161-
$plone-toolbar-submenu-header-color: lighten(#000, 80%);
162-
163-
$plone-toolbar-locked-color: var(--bs-warning); // is intranet
164-
165-
$plone-toolbar-width: 220px;
166-
$plone-toolbar-width-collapsed: calc($spacer * 2.25);
167-
$plone-toolbar-top-height: calc($spacer * 2.5);
168-
169-
@import "bootstrap/scss/bootstrap";
170-
171-
@import "@plone/plonetheme-barceloneta-base/scss/toolbar";
172-
@import "@plone/plonetheme-barceloneta-base/scss/controlpanels";
173-
@import "@plone/plonetheme-barceloneta-base/scss/forms";
174-
```
130+
When you create a theme from scratch, it is convenient to reuse the Barceloneta theme for:
175131

176-
```{tip}
177-
See all the [barceloneta SCSS files](https://github.com/plone/plonetheme.barceloneta/tree/master/scss)
178-
that are available and import the ones that you want to use.
179-
```
132+
- Plone toolbar
133+
- add and edit forms
134+
- control panels
180135

181-
Add `@plone/plonetheme-barceloneta-base` as a dependency:
136+
To do so, follow this guide.
182137

183-
```shell
184-
yarn add @plone/plonetheme-barceloneta-base
185-
```
138+
- Create a new CSS file in your theme, such as the following.
186139

187-
Add a script on `package.json` to compile the CSS:
140+
```scss
141+
// plone variables (used in toolbar)
142+
// Plone specific colors
143+
//colors
144+
$state-draft-color: #fab82a!default; // lime-yellow //draft is visible
145+
$state-pending-color: #e2e721!default; // orange
146+
$state-private-color: #c4183c!default; // red
147+
$state-internal-color: #fab82a!default; // is draft
148+
$state-internally-published-color: #883dfa!default; // is intranet
149+
$plone-link-color: #007bb1!default; //plone blue made slightly darker for wcag 2.0
150+
$spacer: 1rem!default;
151+
152+
// Toolbar
153+
$plone-toolbar-bg: rgba(0, 0, 0, 0.9);
154+
$plone-toolbar-submenu-bg: rgba(20, 20, 20, 0.95);
155+
$plone-toolbar-font-primary: "Roboto Condensed", sans-serif;
156+
$plone-toolbar-font-secondary: "Roboto", sans-serif;
157+
$plone-toolbar-separator-color: rgba(255, 255, 255, 0.17);
158+
$plone-toolbar-link: $plone-link-color;
159+
$plone-toolbar-text-color: rgba(255, 255, 255, 0.9);
160+
$plone-toolbar-submenu-text-color: #fff;
161+
$plone-toolbar-submenu-header-color: lighten(#000, 80%);
162+
163+
$plone-toolbar-locked-color: var(--bs-warning); // is intranet
164+
165+
$plone-toolbar-width: 220px;
166+
$plone-toolbar-width-collapsed: calc($spacer * 2.25);
167+
$plone-toolbar-top-height: calc($spacer * 2.5);
168+
169+
@import "bootstrap/scss/bootstrap";
170+
171+
@import "@plone/plonetheme-barceloneta-base/scss/toolbar";
172+
@import "@plone/plonetheme-barceloneta-base/scss/controlpanels";
173+
@import "@plone/plonetheme-barceloneta-base/scss/forms";
174+
```
188175

189-
```json
190-
"css-compile-main": "sass --load-path=node_modules --style expanded --source-map --embed-sources --no-error-css plone.scss:../static/plone.css"
191-
```
176+
```{tip}
177+
See all the available [Barceloneta SCSS files](https://github.com/plone/plonetheme.barceloneta/tree/master/scss), and import the ones that you want to use.
178+
```
192179

193-
```{tip}
194-
Look at [plonetheme.barcelonta package.json](https://github.com/plone/plonetheme.barceloneta/blob/master/package.json)
195-
for a few more scripts to prefix and minify your CSS to get a production ready bundle.
196-
```
197-
198-
Run the compilation:
180+
- Add `@plone/plonetheme-barceloneta-base` as a dependency.
199181

200-
```shell
201-
yarn run css-compile-main
202-
```
182+
```shell
183+
yarn add @plone/plonetheme-barceloneta-base
184+
```
185+
186+
- Add a script in {file}`package.json` to compile the CSS.
187+
188+
```json
189+
"css-compile-main": "sass --load-path=node_modules --style expanded --source-map --embed-sources --no-error-css plone.scss:../static/plone.css"
190+
```
191+
192+
```{tip}
193+
Look at [`plonetheme.barcelonta`'s {file}`package.json`](https://github.com/plone/plonetheme.barceloneta/blob/master/package.json) for a few more scripts that can prefix and minify your CSS and get a bundle for use in production.
194+
```
195+
196+
- Run the compilation.
197+
198+
```shell
199+
yarn run css-compile-main
200+
```
201+
202+
- Finally, {ref}`register the bundle <classic-ui-from-scratch-bundle-registration-label>`.
203203

204-
Finally, register the bundle: {ref}`classic-ui-from-scratch-bundle-registration-label`.
204+
With this guide, you will save yourself quite some work on styling the toolbar, the add and edit forms, and control panels, while keeping the rest of your theming separate.
205205

206-
With this, you will save yourself quite some work on styling the toolbar, the add/edit forms and controlpanels,
207-
while keeping the rest of your theming on your own.
208206

209207
#### Templates
210208

0 commit comments

Comments
 (0)