The HTML5 applications support the integration of custom themes. Before proceeding, we recommend that you read the Angular Material Theming guide.
- Change the variables in the file custom-theme.scss as required:
$font-family$primary$accent$warn
- Rename the
$theme-namevariable to your theme's name. (e.g.space-theme) - In a terminal, change to the
imxweb/custom-themefolder and run thenpm run buildcommand - Take the
custom-theme.cssfile and create a .zip file. The naming convention is to useHtml_<ThemeName>.zip(for exampleHtml_space-theme.zip). - Copy the .zip file to the
imxwebfolder. - Create a folder inside the
imxwebfolder with the name of your .zip file (e.g.Html_space-theme). - Create a
imx-theme-config.jsonfile inside in this folder. Use this text as a content template, filling in the correct values for your theme.Name: a unique name and identifier of the themeDisplayName: a user friendly name for display purposesClass: the CSS class identifier which is used for theming (e.g.eui-light-themein default)Urls: a list of all relevant files for this theme (also pictures, icons or other resources which are referenced if required)
{
"Themes": [
{
"Name": "space-theme",
"DisplayName": "Space Theme",
"Class": "space-theme",
"Urls": ["../space-theme/custom-theme.css"]
}
]
}- Upload the .zip file and the
imx-theme-config.jsonfile with Software Loader like you would with an Angular plugin. - Restart your API server.
- Login to Web Portal > Click on your username > Select "User Interface Settings" > Change the application's theme to your custom theme.
Note: Multiple theme definition files are possible. Multiple themes can also be declared inside one theme imx-theme-config.json file, however every theme needs to be provided as single .zip file.