我有几台服务器。每个HAC都安装了“傲慢”,我希望能够根据自己所在的环境选择HAC的背景色。
示例:
我怎样才能做到这一点?
发布于 2018-03-12 12:08:51
这是可能的,但是您必须修改hybris\bin\platform\ext\hac\web\webroot\static\css\style.css
文件中的一些行。
您应该:
body.logincontainer
选择器并注释掉行:
背景颜色:#162 c5e;背景:-moz线性梯度(顶部,#1d346b,#162 c5f)#162 c5e;背景:-ms线性梯度(顶部,#1d346b,#162 c5f)#162 c5e;背景:o-线性梯度(顶部,#1d346b,#162 c5f)#162 c5e;背景:-webkit梯度(线性,中心顶部,中心底部,从(#1d346b)到(#162 c5f)#162 c5e;背景:线性梯度(顶部,#1d346b,#162c5f) #162 c5e;背景:线性梯度(顶部,#1d346b,#162c5f) #162 c5e;滤波器: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1d346b,endColorstr=#162c5f;-ms-过滤器: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1d346b,endColorstr#162c5f);body.logincontainer
中:
背景颜色:红色;body
选择器并注释掉行:
背景:url(“./img/ scroll BG.gif”)重复-x滚动0 #4B5367;body
选择器中:
背景颜色:红色;然后,HAC将如下所示:
发布于 2018-03-13 04:42:51
如果您想要自动完成此操作,那么对于在每个环境上安装项目或/和每个部署的每个开发人员:
deployment/cmdb
中,在application.properties
文件中,必须为不同的环境添加以下内容:- _DEV environment_ : no need to changes this environment, just use the default templates
- _TEST environment_ : `#custom hac/backoffice css`
xxx.backoffice.extracss=body {背景:#006600无!重要;} xxx.hac.extracss=body {背景:#006600无!重要;}
- _PROD environment :_ `#custom hac/backoffice css`
xxx.backoffice.extracss=body {背景:#660000无!重要;} xxx.hac.extracss=body {背景:#660000无!重要;}
1. In the `src/hybris/bin/custom/xxx/xxxcore/buildcallbacks.xml`, go to the balise `<macrodef name="xxx_before_build">` and add:
<if> <isset property="xxx.backoffice.extracss"/> <then> <echo message="Customizing hmc css with ${xxx.backoffice.extracss}"/> <echo file="${HYBRIS\_BIN\_DIR}/custom/xxx/xxxcore/hmc/jsp/ext/xxxcore/css/xxxcore.css">${xxx.backoffice.extracss}</echo> </then> <else> <echo file="${HYBRIS\_BIN\_DIR}/custom/xxx/xxxcore/hmc/jsp/ext/xxxcore/css/xxxcore.css"/> </else> </if> <if> <isset property="xxx.hac.extracss"/> <then> <echo message="Customizing hac css with ${xxx.hac.extracss}"/> <echo file="${HYBRIS\_BIN\_DIR}/platform/ext/hac/web/webroot/static/css/xxxcore.css">${xxx.hac.extracss}</echo> </then> <else> <echo file="${HYBRIS\_BIN\_DIR}/platform/ext/hac/web/webroot/static/css/xxxcore.css"/> </else> </if>
2. In the `src/hybris/bin/ext-platform-optional/hmc/web/webroot/css/hmc.css` add :
/===启动扩展名:xxxcore.css==/
body {background: #333333 none !important;}
platform/ext/hac/web/webroot/static/css/style.css
中添加:
@IMPORT url("xxxcore.css");src/hybris/config/customize/platform/ext/hac/web/webroot/static/css/style.css
中添加:
@IMPORT url("xxxcore.css");注意:不要忘记用您的扩展名替换 xxx!
https://stackoverflow.com/questions/49238893
复制