64 lines
2.3 KiB
HTML
64 lines
2.3 KiB
HTML
<mat-toolbar color="primary">
|
|
<a href="javascript:" mat-icon-button>
|
|
<mat-icon (click)="sidenav.toggle()">menu</mat-icon>
|
|
</a>
|
|
<mat-icon svgIcon="logo"></mat-icon>
|
|
<span>
|
|
{{'bstlboard' | i18n}}
|
|
</span>
|
|
<span class="spacer"></span>
|
|
<ng-container *ngIf="auth && auth.authenticated">
|
|
<a routerLink="/submit" mat-raised-button color="accent">{{'submission' |
|
|
i18n}}</a>
|
|
</ng-container>
|
|
|
|
</mat-toolbar>
|
|
|
|
<mat-sidenav-container>
|
|
<mat-sidenav #sidenav [mode]="isBiggerScreen() ? 'side' : 'over'" [(opened)]="opened"
|
|
(click)="!isBiggerScreen() && opened=false">
|
|
|
|
<mat-nav-list>
|
|
<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="/" routerLinkActive="active" mat-list-item>
|
|
<mat-icon>trending_up</mat-icon> {{'top' | i18n}}
|
|
</a>
|
|
<a *ngIf="auth && auth.authenticated" routerLink="/new" routerLinkActive="active" mat-list-item>
|
|
<mat-icon>history</mat-icon> {{'new' | i18n}}
|
|
</a>
|
|
<a *ngIf="auth && auth.authenticated" routerLink="/bookmarks" routerLinkActive="active" mat-list-item>
|
|
<mat-icon>bookmarks</mat-icon> {{'bookmarks' | i18n}}
|
|
</a>
|
|
<mat-divider></mat-divider>
|
|
<a *ngIf="auth && auth.authenticated" routerLink="/settings" routerLinkActive="active" mat-list-item>
|
|
<mat-icon>tune</mat-icon> {{'settings' | i18n}}
|
|
</a>
|
|
<mat-divider></mat-divider>
|
|
<a *ngIf="auth && auth.authenticated" (click)="logout()" mat-list-item>
|
|
<mat-icon>exit_to_app</mat-icon> {{'logout' | i18n}}
|
|
</a>
|
|
</mat-nav-list>
|
|
|
|
<span class="spacer"></span>
|
|
|
|
<mat-nav-list>
|
|
<a *ngFor="let locale of locales" mat-list-item (click)="setLocale(locale)">
|
|
<mat-icon *ngIf="locale == currentLocale">done</mat-icon>{{'locale.' + locale + '.long' |
|
|
i18n}}
|
|
</a>
|
|
<a mat-list-item (click)="toggleDarkTheme()" >
|
|
<mat-slide-toggle [checked]="darkTheme">
|
|
{{'darkTheme' | i18n}}
|
|
</mat-slide-toggle>
|
|
</a>
|
|
|
|
</mat-nav-list>
|
|
</mat-sidenav>
|
|
|
|
<!-- Main content -->
|
|
<mat-sidenav-content>
|
|
<router-outlet></router-outlet>
|
|
</mat-sidenav-content>
|
|
</mat-sidenav-container> |