we_bstly-web/src/app/app.component.html

57 lines
2.2 KiB
HTML
Raw Normal View History

2020-11-02 08:29:52 +01:00
<mat-toolbar color="primary">
<a href="javascript:" mat-icon-button aria-label="Menu">
<mat-icon (click)="sidenav.toggle()">menu</mat-icon>
</a>
<span>
<mat-icon svgIcon="logo"></mat-icon> we.bstly
</span>
<span class="spacer"></span>
<ng-container>
<button mat-button [matMenuTriggerFor]="menu">
<mat-icon>language</mat-icon>
<mat-icon>arrow_drop_down</mat-icon>
</button>
<mat-menu #menu="matMenu">
<a mat-menu-item (click)="setLocale('en')">{{'locale.en.long' | i18n}}</a>
<a mat-menu-item (click)="setLocale('de-informal')">{{'locale.de-informal.long' | i18n}}</a>
</mat-menu>
</ng-container>
</mat-toolbar>
<mat-sidenav-container>
<mat-sidenav #sidenav [mode]="isBiggerScreen() ? 'side' : 'over'" [(opened)]="opened"
(click)="!isBiggerScreen() && opened=false">
<mat-nav-list>
<a routerLink="/" aria-label="Home" mat-list-item>
<mat-icon>home</mat-icon> {{'home' | i18n}}
</a>
<a *ngIf="!auth || auth && !auth.authenticated" routerLink="/login" routerLinkActive="active" mat-list-item>
<mat-icon>login</mat-icon> {{'login' | i18n}}
</a>
<a *ngIf="auth && auth.authenticated" routerLink="/account/info" routerLinkActive="active" mat-list-item>
<mat-icon>account_circle</mat-icon> {{'account' | i18n}}
</a>
<a *ngIf="auth && auth.authenticated" routerLink="/apps" routerLinkActive="active" mat-list-item>
<mat-icon>widgets</mat-icon> {{'apps' | i18n}}
</a>
<a routerLink="/tokens" aria-label="Enter tokens" mat-list-item>
<mat-icon>card_giftcard</mat-icon> {{'tokens.redeem' | i18n}}
</a>
<a href="https://we.bstly.de" target="_blank" aria-label="Go to we.bstly.de" mat-list-item>
<mat-icon>shopping_cart</mat-icon> {{'tokens.get' | i18n}}<mat-icon style="font-size: 1em;">open_in_new
</mat-icon>
</a>
<a *ngIf="auth && auth.authenticated" (click)="logout()" mat-list-item>
<mat-icon>exit_to_app</mat-icon> {{'logout' | i18n}}
</a>
</mat-nav-list>
</mat-sidenav>
<!-- Main content -->
<mat-sidenav-content>
<div class="container">
<router-outlet></router-outlet>
</div>
</mat-sidenav-content>
</mat-sidenav-container>