Styles and Icons #
While customizing your Portal, keep the following in mind:
- any
.css
and.less
files that live anywhere undersrc/lib
andsrc/portlets
will be automatically loaded - assets are loaded first so they might get overridden by styles written in the Pragma Engine
lib
andportlets
directories
For more information, see Styles and assets.
Add custom styles and icons #
In this section, we’ll go over one way you can customize the styling and icons in your Portal.
To customize the styling and icons in your Portal, add the configurations to platform/5-ext/portal/src/config/default.js
for your overlay. Below is an example of adding custom styling and icons by editing your default.js
.
module.exports = {
common: {
'assets.styles': ['css/common.less', 'css/example.css'],
'assets.iconDirs': ['icons/example'],
},
}
Styles #
To add custom styles (.css
or .less
) in Portal, do the following:
- Add the file
css/example.css
toassets.styles
to tell the overlay where to find the style sheet. - Add your custom css in
platform/5-ext/portal/src/assets/css/example.css
.
Icons #
Custom icons can be added and are loaded with the filename as the icon name. To add custom icons and override existing icons in Portal, do the following:
- Add the path
icons/example
toassets.iconDirs
to tell the overlay where to find them. - Add your custom icons in
platform/5-ext/portal/src/assets/icons/example
.- Icons must be
.svg
to appear in Portal. - Icons in
assets.iconDirs
will override the icons in the base directory that share the same name. For example, to replace the Portal logo name your logologoPortal.svg
.
- Icons must be