2023-02-15 10:53:25 +01:00
|
|
|
<aside id="sidebar_main" class="uk-visible@m">
|
2023-01-25 07:00:35 +01:00
|
|
|
<div sidebar-content>
|
2023-02-15 10:53:25 +01:00
|
|
|
<ng-container *ngTemplateOutlet="menu; context: {mobile: false}"></ng-container>
|
2019-12-23 13:52:26 +01:00
|
|
|
</div>
|
|
|
|
</aside>
|
2023-02-15 10:53:25 +01:00
|
|
|
<div class="uk-hidden@m">
|
|
|
|
<div id="sidebar_offcanvas" #sidebar_offcanvas [attr.uk-offcanvas]="'overlay: true'">
|
|
|
|
<div class="uk-offcanvas-bar uk-padding-remove-horizontal">
|
|
|
|
<button class="uk-offcanvas-close uk-icon uk-close">
|
|
|
|
<icon name="close" ratio="1.5" visuallyHidden="close menu"></icon>
|
|
|
|
</button>
|
|
|
|
<ng-container *ngTemplateOutlet="menu; context: {mobile: true}"></ng-container>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<ng-template #menu let-mobile=mobile>
|
|
|
|
<div *ngIf="items.length > 0" class="menu_section uk-margin-large-top" [class.mobile]="mobile" style="min-height: 30vh">
|
|
|
|
<ul #nav class="uk-list uk-nav uk-nav-parent-icon"
|
|
|
|
[class.uk-nav-default]="!mobile" [class.uk-nav-primary]="mobile" uk-nav="duration: 400">
|
|
|
|
<ng-template ngFor [ngForOf]="items" let-item>
|
|
|
|
<li [class.uk-active]="item.isActive"
|
|
|
|
[class.uk-parent]="item.items.length > 0">
|
|
|
|
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
|
|
|
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
|
|
|
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
|
|
|
|
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" ratio="0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
|
|
|
</div>
|
|
|
|
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
|
|
|
</a>
|
|
|
|
<ul *ngIf="item.items?.length > 0 && (isBrowser || item.isActive)" class="uk-nav-sub">
|
|
|
|
<li *ngFor="let subItem of item.items"
|
|
|
|
[class.uk-active]="subItem.isActive">
|
|
|
|
<a [routerLink]="subItem.route?subItem.route:null" [title]="subItem.title" (click)="closeOffcanvas()"
|
|
|
|
[queryParams]="subItem.route?subItem.params:null" [queryParamsHandling]="subItem.route?queryParamsHandling:null">
|
|
|
|
<span class="uk-text-truncate">{{subItem.title}}</span></a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ng-template>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="specialMenuItem" class="menu_section uk-margin-xlarge-top" [class.mobile]="mobile" >
|
|
|
|
<ul class="uk-list uk-nav uk-nav-default" uk-nav>
|
|
|
|
<li [class.uk-active]="isTheActiveUrl(specialMenuItem.route)">
|
|
|
|
<a [routerLink]="specialMenuItem.route" [queryParams]="specialMenuItem.params"
|
|
|
|
(click)="closeOffcanvas()"
|
|
|
|
[queryParamsHandling]="queryParamsHandling">
|
|
|
|
<div class="uk-flex uk-flex-middle uk-flex-center">
|
|
|
|
<div *ngIf="specialMenuItem.icon" class="uk-width-auto">
|
|
|
|
<icon class="menu-icon" [customClass]="specialMenuItem.icon.class" [name]="specialMenuItem.icon.name" ratio="1.2" [svg]="specialMenuItem.icon.svg" [flex]="true"></icon>
|
|
|
|
</div>
|
|
|
|
<span class="uk-width-expand uk-text-truncate uk-margin-small-left"
|
|
|
|
[class.hide-on-close]="specialMenuItem.icon">{{specialMenuItem.title}}</span>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|