mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
- New config.json global config file - Customisation: API endpoint, app name, doc link, logo, error and banner images, theme - Basic external plugin support to allow users to write UI plugins in any framework, build and import/plug a html file as integration Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2.6 KiB
2.6 KiB
UI customization
Use a public/config.json (or dist/config.json after build) file for customizing theme, logos,...
Images
Change the image of the logo, login banner, error page, etc.
{
"logo": "assets/logo.svg",
"banner": "assets/banner.svg",
"error": {
"404": "assets/404.png",
"403": "assets/403.png",
"500": "assets/500.png"
}
}
logochanges the logo top-left side image.bannerchanges the login banner image.error.404change the image of error Page not found.error.403change the image of error Forbidden.error.500change the image of error Internal Server Error.
Theme
Customize themes like colors, border color, etc.
{
"theme": {
"@primary-color": "#1890ff",
"@success-color": "#52c41a",
"@processing-color": "#1890ff",
"@warning-color": "#faad14",
"@error-color": "#f5222d",
"@font-size-base": "14px",
"@heading-color": "rgba(0, 0, 0, 0.85)",
"@text-color": "rgba(0, 0, 0, 0.65)",
"@text-color-secondary": "rgba(0, 0, 0, 0.45)",
"@disabled-color": "rgba(0, 0, 0, 0.25)",
"@border-color-base": "#d9d9d9",
"@logo-width": "256px",
"@logo-height": "64px",
"@banner-width": "700px",
"@banner-height": "110px",
"@error-width": "256px",
"@error-height": "256px"
}
}
@primary-colorchange the major background color of the page (background button, icon hover, etc).@success-colorchange success state color.@processing-colorchange processing state color. Exp: progress status.@warning-colorchange warning state color.@error-colorchange error state color.@heading-colorchange table header color.@text-colorchange in major text color.@text-color-secondarychange of secondary text color (breadcrumb icon).@disabled-colorchange disable state color (disabled button, switch, etc).@border-color-basechange in major border color.@logo-widthchange the width of the logo top-left side.@logo-heightchange the height of the logo top-left side.@banner-widthchanges the width of the login banner.@banner-heightchanges the height of the login banner.@error-widthchanges the width of the error image.@error-heightchanges the height of the error image.
Assorted primary theme colours:
- Blue: #1890FF
- Red: #F5222D
- Yellow: #FAAD14
- Cyan: #13C2C2
- Green: #52C41A
- Purple: #722ED1
Also, to add other properties, we can add new properties into theme.config.js based on the Ant Design Vue Less variable.
Refer: https://www.antdv.com/docs/vue/customize-theme/#Ant-Design-Vue-Less-variables