Adjust overlay_gradient to accept numeric transparency values.
Replaced the boolean `overlay_gradient` property with a numeric input to allow for more granular control over the overlay transparency. Updated both the map component and the header logic to handle this change dynamically.
This commit is contained in:
parent
a2f1a079cf
commit
18cc111b26
|
|
@ -10,7 +10,7 @@ export class HeaderComponent {
|
||||||
@Input() current_page: string = '';
|
@Input() current_page: string = '';
|
||||||
@Input() background_image: string = '';
|
@Input() background_image: string = '';
|
||||||
@Input() height: string = '';
|
@Input() height: string = '';
|
||||||
@Input() overlay_gradient: boolean = false;
|
@Input() overlay_gradient: number = 0;
|
||||||
|
|
||||||
public active: string = '';
|
public active: string = '';
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ export class HeaderComponent {
|
||||||
|
|
||||||
public getBackgroundImage() {
|
public getBackgroundImage() {
|
||||||
if (this.overlay_gradient) {
|
if (this.overlay_gradient) {
|
||||||
return `linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url(${this.background_image})`;
|
return `linear-gradient(rgba(0, 0, 0, ${this.overlay_gradient}), rgba(0, 0, 0, ${this.overlay_gradient})), url(${this.background_image})`;
|
||||||
} else {
|
} else {
|
||||||
return `url(${this.background_image})`;
|
return `url(${this.background_image})`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<app-header [current_page]="'map'"
|
<app-header [current_page]="'map'"
|
||||||
[background_image]="'public/img/backgrounds/map.jpg'"
|
[background_image]="'public/img/backgrounds/map.jpg'"
|
||||||
[overlay_gradient]="true">
|
[overlay_gradient]=0.65>
|
||||||
<div class="title" header-content>
|
<div class="title" header-content>
|
||||||
<h1>Dynamic Server Maps</h1>
|
<h1>Dynamic Server Maps</h1>
|
||||||
<h2>Which server would you like to see?</h2>
|
<h2>Which server would you like to see?</h2>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user