Enhance header and map components with new features

Refactor header background styling to use a method supporting optional gradient overlays. Update map component to include detailed server map links and adjust styling for better layout and clarity.
This commit is contained in:
2025-04-05 23:00:03 +02:00
parent 9761923190
commit a2f1a079cf
4 changed files with 32 additions and 4 deletions
@@ -1,5 +1,6 @@
<ng-container>
<header id="top" [ngStyle]="{ 'background-image': 'url(' + background_image + ')', 'height': height }">
<header id="top"
[ngStyle]="{ 'background-image': getBackgroundImage(), 'height': height }">
<nav id="nav" [ngClass]="active">
<div class="container">
<div id="mobile_nav">
@@ -10,6 +10,7 @@ export class HeaderComponent {
@Input() current_page: string = '';
@Input() background_image: string = '';
@Input() height: string = '';
@Input() overlay_gradient: boolean = false;
public active: string = '';
@@ -23,6 +24,15 @@ export class HeaderComponent {
}
}
public getBackgroundImage() {
if (this.overlay_gradient) {
return `linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url(${this.background_image})`;
} else {
return `url(${this.background_image})`;
}
}
public getCurrentPageId(options: string[]) {
if (options.includes(this.current_page)) {
return 'current_page'