Nicola Zambello
Frontend developer @ RedTurtle
Volto Team member @ Plone
@nicolazambello
nzambello
In the history of web
AGID 2017
AGID 2019
Reusable and customizable themes for PA websites
Reusable and customizable themes for PA websites
Bootstrap-based kit
React kit implementation
We want to adopt Volto
We have to include Bootstrap
We have SemanticUI in Volto
The scenario:
Me solving conflicts:
A new theme: pastanaga-cms-ui
Load only the CSS needed for Volto admin UI
- import 'semantic-ui-less/semantic.less';
+ import '@plone/volto/../theme/themes/pastanaga-cms-ui/extras/cms-ui.semantic.less';
import '@plone/volto/../theme/themes/pastanaga/extras/extras.less'
+ // Import your site styles, i.e.:
+ import '../theme/site.scss';
In your
src/theme.js
- @container : 'pastanaga';
+ @container : 'pastanaga-cms-ui';
And in your
theme.config
Add to your workspace
razzle-plugin-scss
const volto_config = require(`${voltoPath}/razzle.config`);
module.exports = Object.assign({}, volto_config, {
modify: (config, { target, dev }, webpack) => {
...
},
plugins: [
{
name: 'scss',
options: {
sass: {
dev: {
outputStyle: 'expanded',
sourceMap: true,
includePaths: ['node_modules'],
},
prod: {
outputStyle: 'expanded',
sourceMap: true,
includePaths: ['node_modules'],
}
},
},
},
],
});
Adapt your
razzle.config.js
body.cms-ui {
.public-ui {
font-size: 18px;
font-weight: 300;
}
}
and wrap your components with
.public-ui
Base common package
Base common package
Base common package
New intermediate layer for SemanticUI
New intermediate layer for SemanticUI
pastanaga
design-volto-theme
Site
Base common package
New intermediate layer for SemanticUI
New config layer for razzle/customizations
Template for actual projects
Template for actual projects
Project template:
design-volto-kit
Yeoman generator:
create-italia-volto-app
So the meaning of life is having fun
̶ Linus Torvalds
Thank you!
̶