[angular-16-irish-monitor | ADDED]: Add environment badge in header of navbar

This commit is contained in:
Konstantinos Triantafyllou 2024-01-08 16:59:32 +02:00
parent 0f52dcbdca
commit b52ef07306
2 changed files with 14 additions and 3 deletions

View File

@ -149,11 +149,15 @@
<div id="main-menu" class="uk-visible@m">
<div *ngIf="activeHeader" [class.uk-light]='activeHeader.darkBg'>
<div class="uk-navbar-container" uk-sticky>
<div *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge">
<img class="uk-position-top-left"
<a *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge"
[routerLink]="activeHeader.environmentBadge?.routerLink?activeHeader.environmentBadge.routerLink:null" target="_blank">
<img *ngIf="!activeHeader.environmentBadge" class="uk-position-top-left"
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
alt="BETA" style="height: 65px; width: 65px; z-index: 1000">
</div>
<img *ngIf="activeHeader.environmentBadge" class="uk-position-top-left"
[src]="activeHeader.environmentBadge.asset" [alt]="properties.environment"
style="height: 75px; width: 75px; z-index: 1000">
</a>
<div class="uk-container uk-container-expand">
<nav class="uk-navbar" uk-navbar="delay-hide: 400">
<ng-container *ngIf="!onlyTop">

View File

@ -24,6 +24,12 @@ import {RouterHelper} from "../utils/routerHelper.class";
declare var UIkit;
export interface Badge {
asset: string,
routerLink?: string,
external?: boolean
}
export interface Header {
route?: string,
url?: string,
@ -33,6 +39,7 @@ export interface Header {
logoInfo?: string,
position: 'left' | 'center' | 'right',
badge: boolean,
environmentBadge?: Badge,
darkBg?: boolean,
menuPosition?: 'center' | 'right',
replaceHeader?: Header;