[angular-16-irish-monitor | ADDED]: Add environment badge in header of navbar
This commit is contained in:
parent
0f52dcbdca
commit
b52ef07306
|
@ -149,11 +149,15 @@
|
||||||
<div id="main-menu" class="uk-visible@m">
|
<div id="main-menu" class="uk-visible@m">
|
||||||
<div *ngIf="activeHeader" [class.uk-light]='activeHeader.darkBg'>
|
<div *ngIf="activeHeader" [class.uk-light]='activeHeader.darkBg'>
|
||||||
<div class="uk-navbar-container" uk-sticky>
|
<div class="uk-navbar-container" uk-sticky>
|
||||||
<div *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge">
|
<a *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge"
|
||||||
<img class="uk-position-top-left"
|
[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')"
|
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||||
alt="BETA" style="height: 65px; width: 65px; z-index: 1000">
|
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">
|
<div class="uk-container uk-container-expand">
|
||||||
<nav class="uk-navbar" uk-navbar="delay-hide: 400">
|
<nav class="uk-navbar" uk-navbar="delay-hide: 400">
|
||||||
<ng-container *ngIf="!onlyTop">
|
<ng-container *ngIf="!onlyTop">
|
||||||
|
|
|
@ -24,6 +24,12 @@ import {RouterHelper} from "../utils/routerHelper.class";
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
|
export interface Badge {
|
||||||
|
asset: string,
|
||||||
|
routerLink?: string,
|
||||||
|
external?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export interface Header {
|
export interface Header {
|
||||||
route?: string,
|
route?: string,
|
||||||
url?: string,
|
url?: string,
|
||||||
|
@ -33,6 +39,7 @@ export interface Header {
|
||||||
logoInfo?: string,
|
logoInfo?: string,
|
||||||
position: 'left' | 'center' | 'right',
|
position: 'left' | 'center' | 'right',
|
||||||
badge: boolean,
|
badge: boolean,
|
||||||
|
environmentBadge?: Badge,
|
||||||
darkBg?: boolean,
|
darkBg?: boolean,
|
||||||
menuPosition?: 'center' | 'right',
|
menuPosition?: 'center' | 'right',
|
||||||
replaceHeader?: Header;
|
replaceHeader?: Header;
|
||||||
|
|
Loading…
Reference in New Issue