32 lines
1.3 KiB
HTML
32 lines
1.3 KiB
HTML
<mat-sidenav-container class="sidenav-container">
|
|
<mat-sidenav #drawer class="sidenav"
|
|
[attr.role]="'dialog'"
|
|
[mode]="'side'">
|
|
<mat-toolbar i18n="title|Title of the sidebar menu">Menu</mat-toolbar>
|
|
<mat-nav-list>
|
|
<a mat-list-item routerLink="elections" i18n="link name|The name of the elections page">Elections</a>
|
|
</mat-nav-list>
|
|
</mat-sidenav>
|
|
<mat-sidenav-content>
|
|
<mat-toolbar color="primary">
|
|
<button
|
|
type="button"
|
|
aria-label="Toggle sidenav"
|
|
mat-icon-button
|
|
(click)="drawer.toggle()">
|
|
<mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
|
|
</button>
|
|
<span i18n="application title|The application title in the toolbar">Electoral Law</span>
|
|
<span class="spacer"></span>
|
|
<ng-container *ngIf="isLoggedIn$ | async; else loginButton">
|
|
<span class="logged-user">Logged in as {{loggedUserName}}</span>
|
|
<button mat-raised-button class="app-nav-icon" (click)="logout()">Logout</button>
|
|
</ng-container>
|
|
<ng-template #loginButton>
|
|
<button mat-raised-button class="app-nav-icon" (click)="login()" i18n>Login</button>
|
|
</ng-template>
|
|
</mat-toolbar>
|
|
<ng-content></ng-content>
|
|
</mat-sidenav-content>
|
|
</mat-sidenav-container>
|