Customization: rename hero to hero section, add description below
This commit is contained in:
parent
d9853e1d91
commit
0dbb8b2c75
|
@ -9,12 +9,14 @@ declare var UIkit;
|
||||||
<color [color]="background.color"
|
<color [color]="background.color"
|
||||||
[label]="label" [light]="light"
|
[label]="label" [light]="light"
|
||||||
(colorChange)=
|
(colorChange)=
|
||||||
" background.color = $event;"></color>
|
" background.color = $event;" [description]="description"></color>
|
||||||
|
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
export class BackgroundComponent implements OnInit {
|
export class BackgroundComponent implements OnInit {
|
||||||
@Input() label:string = "";
|
@Input() label:string = "";
|
||||||
|
@Input() description:string = null;
|
||||||
@Input() background;
|
@Input() background;
|
||||||
@Input() oldBackground;
|
@Input() oldBackground;
|
||||||
@Input() light:boolean;
|
@Input() light:boolean;
|
||||||
|
|
|
@ -11,9 +11,12 @@ import {CustomizationOptions} from '../../openaireLibrary/connect/community/Cust
|
||||||
<input class="uk-margin-small-left color-input" color-picker [colorPicker]="color" [style.background]="color"
|
<input class="uk-margin-small-left color-input" color-picker [colorPicker]="color" [style.background]="color"
|
||||||
(colorPickerChange)="color=$event; colorChanged();"/>
|
(colorPickerChange)="color=$event; colorChanged();"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-small-left"> {{label}}</div>
|
<div class="uk-margin-small-left"> {{label}}
|
||||||
|
<div class="uk-text-meta uk-text-xsmall" *ngIf="description" >{{description}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-text-warning uk-text-xsmall uk-margin-small-left" *ngIf="warningForContrast(color)">Contrast ratio may be too low.</div>
|
<div class="uk-text-warning uk-text-xsmall uk-margin-small-left" *ngIf="warningForContrast(color)">Contrast ratio may be too low.</div>
|
||||||
`,
|
`,
|
||||||
styles:[
|
styles:[
|
||||||
|
@ -35,6 +38,7 @@ export class ColorComponent implements OnInit {
|
||||||
@Input() addMargin: boolean = false;
|
@Input() addMargin: boolean = false;
|
||||||
@Output() colorChange = new EventEmitter();
|
@Output() colorChange = new EventEmitter();
|
||||||
@Input() light:boolean;
|
@Input() light:boolean;
|
||||||
|
@Input() description:string = null;
|
||||||
public warningForContrast(color:string){
|
public warningForContrast(color:string){
|
||||||
return (this.light && CustomizationOptions.isForLightBackground(color)) || (!this.light && !CustomizationOptions.isForLightBackground(color));
|
return (this.light && CustomizationOptions.isForLightBackground(color)) || (!this.light && !CustomizationOptions.isForLightBackground(color));
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,12 +213,12 @@
|
||||||
[light]="false"></background>
|
[light]="false"></background>
|
||||||
<background label="Light" [background]="draftCustomizationOptions.backgrounds.light"
|
<background label="Light" [background]="draftCustomizationOptions.backgrounds.light"
|
||||||
[light]="true"></background>
|
[light]="true"></background>
|
||||||
<background label="Hero" [background]="draftCustomizationOptions.backgrounds.form"
|
<background label="Hero section" [background]="draftCustomizationOptions.backgrounds.form"
|
||||||
[light]="true"
|
[light]="true"
|
||||||
[oldBackground]="publishedCustomizationOptions.backgrounds.form"
|
[oldBackground]="publishedCustomizationOptions.backgrounds.form"
|
||||||
[communityId]="communityId"></background>
|
[communityId]="communityId" description="The area under menu"></background>
|
||||||
<div class="uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold uk-margin-large-top">
|
<div class="uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold uk-margin-large-top">
|
||||||
Hero Image
|
Hero section image
|
||||||
<a *ngIf="(formHasChanges(publishedCustomizationOptions, draftCustomizationOptions) )
|
<a *ngIf="(formHasChanges(publishedCustomizationOptions, draftCustomizationOptions) )
|
||||||
&& draftCustomizationOptions.backgroundsIsCustom"
|
&& draftCustomizationOptions.backgroundsIsCustom"
|
||||||
(click)="resetImageTo(publishedCustomizationOptions.backgrounds);" class="uk-margin-small-left"
|
(click)="resetImageTo(publishedCustomizationOptions.backgrounds);" class="uk-margin-small-left"
|
||||||
|
|
Loading…
Reference in New Issue