diff --git a/connect/community/CustomizationOptions.ts b/connect/community/CustomizationOptions.ts index 9de9d949..438ded92 100644 --- a/connect/community/CustomizationOptions.ts +++ b/connect/community/CustomizationOptions.ts @@ -1,7 +1,10 @@ +import {properties} from "../../../../environments/environment"; + export class Layout { _id:string; portalPid:string; layoutOptions:CustomizationOptions; + date:Date; constructor(community, options:CustomizationOptions){ this.portalPid = community; this.layoutOptions = options; @@ -14,11 +17,22 @@ export class Layout { if(options.identity) { variables['@global-primary-background'] = options.identity.mainColor; variables['@global-secondary-background'] = options.identity.secondaryColor; + variables['@primary-color'] = options.identity.mainColor; + variables['@secondary-color'] = options.identity.secondaryColor; + } + if(options.backgrounds){ + variables['@general-search-form-background'] = options.backgrounds.form.color; + variables['@general-search-form-background-image'] = (options.backgrounds.form.imageFile?(this.getUrl(properties.utilsService + '/download/' +options.backgrounds.form.imageFile)): 'none') ; + variables['@base-body-background'] = options.backgrounds.light.color; } return variables; } return null; } + public static getUrl(url){ + return 'url("' + url + '")'; + } + } export class CustomizationOptions { identity: {