From 358ffe219760fc95f3ddd541034d0134f4cb123b Mon Sep 17 00:00:00 2001 From: Cilibiu Bogdan Date: Wed, 6 Dec 2017 08:10:31 +0200 Subject: [PATCH] [ACA] Header - custom color (#114) * custom header color * use SecurityContext.STYLE --- src/app.config.json | 1 + src/app/components/header/header.component.html | 2 +- src/app/components/header/header.component.scss | 2 +- src/app/components/header/header.component.ts | 14 ++++++++++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/app.config.json b/src/app.config.json index e5ea19e7f..d86f8657f 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -5,6 +5,7 @@ "build": "1234" }, "logo": "/assets/images/alfresco-logo-white.svg", + "headerColor": "#2196F3", "languagePicker": false, "document-list": { "supportedPageSizes": [ diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index d6d641262..a289d2284 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -1,4 +1,4 @@ - + this.appConfig.get('application.name'); @@ -36,4 +41,9 @@ export class HeaderComponent { get logo() { return this.appConfig.get('logo', this.defaultPath); } + + get backgroundColor() { + const color = this.appConfig.get('headerColor', this.defaultBackgroundColor); + return this.sanitizer.sanitize(SecurityContext.STYLE, color); + } }