2017-12-19 13:53:46 +01:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
import {ActivatedRoute} from '@angular/router';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'showTitle',
|
|
|
|
template: `
|
2020-05-19 17:33:47 +02:00
|
|
|
<h1 [ngClass]="classNames">
|
2019-09-05 10:49:33 +02:00
|
|
|
<div *ngIf="title != undefined" class="landingTitle">
|
2020-03-16 14:09:46 +01:00
|
|
|
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
|
2019-09-05 10:49:33 +02:00
|
|
|
class="custom-external">
|
|
|
|
<a *ngIf="title['name'] != undefined && title['name'] != ''"
|
|
|
|
href="{{title['url']}}" target="_blank"
|
|
|
|
[innerHTML]="title['name']">
|
|
|
|
</a>
|
|
|
|
<a *ngIf="title['name'] == undefined || title['name'] == ''"
|
|
|
|
href="{{title['url']}}" target="_blank">
|
|
|
|
[no title available]
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<span *ngIf="(title['name'] != undefined && title['name'] != '') &&
|
|
|
|
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
|
|
|
[innerHTML]="title['name']">
|
|
|
|
</span>
|
|
|
|
<span *ngIf="(title['name'] == undefined || title['name'] == '') &&
|
|
|
|
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
|
|
|
>
|
|
|
|
[no title available]
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="titleName">
|
|
|
|
<span [innerHTML]="titleName"></span>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!titleName && !title">
|
2020-07-14 12:18:40 +02:00
|
|
|
<span>No title available</span>
|
2019-09-05 10:49:33 +02:00
|
|
|
</div>
|
2020-03-16 14:09:46 +01:00
|
|
|
</h1>
|
2017-12-19 13:53:46 +01:00
|
|
|
`
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
export class ShowTitleComponent {
|
2018-06-28 16:52:45 +02:00
|
|
|
@Input() titleName: string;
|
2017-12-19 13:53:46 +01:00
|
|
|
@Input() title: { [key: string]: string };
|
|
|
|
@Input() iconClass:string;
|
2019-09-05 10:49:33 +02:00
|
|
|
@Input() classNames: string = "";
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2020-11-11 15:43:13 +01:00
|
|
|
constructor () {}
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
}
|