jumbotron h1

master
Boris Voropaev 2023-11-28 17:57:13 +03:00
parent ddccbafc0a
commit 03495e7b39
1 changed files with 14 additions and 2 deletions

View File

@ -39,7 +39,7 @@ export class JumbotronComponent {
)
}
ngOnDestoy(){
this.subscription.unsubscribe()
this.subscription.unsubscribe();
}
@ -48,7 +48,19 @@ export class JumbotronComponent {
get name(){
return this.contentPage?.h1 || this.contentPage?.name
let name:string
if(this.currentPage){
name = this.currentPage?.h1 || this.currentPage?.name
let parents = this.currentPage?.parents?.data
if(parents){
if (parents[1]?.type.name=='nav-page'){
if (parents[2]) name = parents[2].h1|| parents[2].name
}else{
if (parents[1]) name = parents[1].h1|| parents[1].name
}
}
}
return name
}
get bgStyle(){