Refactor header structure

Reorganized header component to use content projection for titles and simplified input properties.
This commit is contained in:
2025-04-05 20:02:51 +02:00
parent 5aec42320a
commit 42dd1a184c
7 changed files with 129 additions and 140 deletions
@@ -1,5 +1,4 @@
import {Component, HostListener, Input} from '@angular/core';
import {ALTITUDE_VERSION} from '../constant';
@Component({
standalone: false,
@@ -8,8 +7,6 @@ import {ALTITUDE_VERSION} from '../constant';
styleUrls: ['./header.component.scss']
})
export class HeaderComponent {
@Input() title: string = '';
@Input() sub_title: string = '';
@Input() current_page: string = '';
@Input() background_image: string = '';
@@ -25,22 +22,10 @@ export class HeaderComponent {
}
}
scrollToSection(): void {
const element = document.getElementById('scrollingpoint');
if (element) {
element.scrollIntoView({behavior: 'smooth', block: 'start'});
} else {
console.error('Element with id "scrollingpoint" not found.');
}
}
public getCurrentPageId(options: string[]) {
if (options.includes(this.current_page)) {
return 'current_page'
}
return null;
}
protected readonly ALTITUDE_VERSION = ALTITUDE_VERSION;
}