-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from gisktzh/feature/gb3-1724-hamburger-menu
GB3-1724: hamburger menu
- Loading branch information
Showing
7 changed files
with
199 additions
and
127 deletions.
There are no files selected for viewing
118 changes: 62 additions & 56 deletions
118
.../shared/components/navbar-mobile/navbar-mobile-dialog/navbar-mobile-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,77 @@ | ||
<mat-card class="navbar-mobile__dialog"> | ||
<mat-card-header class="navbar-mobile__dialog__header"> | ||
<a (click)="this.startLogin()" *ngIf="!this.isAuthenticated; else userProfile" class="navbar__item" mat-button>Login</a> | ||
<ng-template #userProfile> | ||
<a [matMenuTriggerFor]="userMenu" class="navbar__item" mat-button #trigger="matMenuTrigger"> | ||
@if (!isAuthenticated) { | ||
<button (click)="startLogin()" class="navbar__item navbar__user" mat-button> | ||
<mat-icon svgIcon="ktzh_user"></mat-icon> | ||
<span>{{ this.userName }}</span> | ||
<span>Login</span> | ||
</button> | ||
} @else { | ||
<button [matMenuTriggerFor]="userMenu" class="navbar__item navbar__user" mat-button #trigger="matMenuTrigger"> | ||
<mat-icon svgIcon="ktzh_user"></mat-icon> | ||
<span>{{ userName }}</span> | ||
<mat-icon [fontIcon]="trigger.menuOpen ? 'arrow_drop_up' : 'arrow_drop_down'" class="arrow-icon"></mat-icon> | ||
</a> | ||
<mat-menu #userMenu="matMenu"> | ||
<button (click)="this.logout()" mat-menu-item> | ||
</button> | ||
<mat-menu #userMenu="matMenu" style="padding-left: 12px"> | ||
<a href="https://maps.zh.ch/groups_users" target="_blank" rel="noopener noreferrer" mat-menu-item> | ||
<mat-icon svgIcon="ktzh_user"></mat-icon> | ||
<span>Profil</span> | ||
</a> | ||
<mat-divider></mat-divider> | ||
<button (click)="logout()" mat-menu-item> | ||
<mat-icon>logout</mat-icon> | ||
<span>Logout</span> | ||
</button> | ||
</mat-menu> | ||
</ng-template> | ||
} | ||
|
||
<button mat-icon-button (click)="close()"> | ||
<mat-icon>close</mat-icon> | ||
</button> | ||
</mat-card-header> | ||
<mat-card-content class="navbar-mobile__dialog__content"> | ||
<hr /> | ||
<a | ||
[queryParams]="{}" | ||
[routerLinkActiveOptions]="{exact: true}" | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Start]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>Geoportal</a | ||
> | ||
<hr /> | ||
<a | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Maps]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>GIS-Browser</a | ||
> | ||
<hr /> | ||
<a | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Data]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>Geodatenkatalog</a | ||
> | ||
<hr /> | ||
<a | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Support]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>Hilfe & Support</a | ||
> | ||
<hr /> | ||
<a class="navbar__item" href="https://geodatenshop.zh.ch" mat-button target="_blank" rel="noopener noreferrer" (click)="close()"> | ||
<mat-icon>launch</mat-icon> | ||
Geodatenshop</a | ||
> | ||
<hr /> | ||
<div class="navbar-mobile__dialog__content__container"> | ||
<a | ||
[queryParams]="{}" | ||
[routerLinkActiveOptions]="{exact: true}" | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Start]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>Geoportal</a | ||
> | ||
<a | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Maps]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>GIS-Browser</a | ||
> | ||
<a | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Data]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>Geodatenkatalog</a | ||
> | ||
<a | ||
class="navbar__item" | ||
mat-button | ||
[routerLink]="[mainPageEnum.Support]" | ||
routerLinkActive="navbar__item--active" | ||
ariaCurrentWhenActive="page" | ||
(click)="close()" | ||
>Hilfe & Support</a | ||
> | ||
<a class="navbar__item" href="https://geodatenshop.zh.ch" mat-button target="_blank" rel="noopener noreferrer" (click)="close()"> | ||
<mat-icon>launch</mat-icon> | ||
Geodatenshop</a | ||
> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 17 additions & 17 deletions
34
src/app/shared/components/navbar-mobile/navbar-mobile.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<mat-toolbar *ngIf="!isSimplifiedPage; else simplifiedPage" class="navbar-mobile" color="primary"> | ||
<span class="navbar-mobile__item"> Geoportal Kanton Zürich </span> | ||
<span class="navbar-mobile__spacer"></span> | ||
<button class="navbar-mobile__item" mat-button (click)="showMenu()"> | ||
<span class="navbar-mobile__item__text">Menu</span> | ||
@if (!isSimplifiedPage) { | ||
<mat-toolbar class="navbar-mobile" color="primary"> | ||
<span class="navbar-mobile__item"> Geoportal Kanton Zürich </span> | ||
<span class="navbar-mobile__spacer"></span> | ||
<button class="navbar-mobile__item" mat-button (click)="showMenu()"> | ||
<span class="navbar-mobile__item__text">Menu</span> | ||
|
||
<mat-icon svgIcon="ktzh_menu_mobile" iconPositionEnd>launch</mat-icon> | ||
</button> | ||
<div class="navbar-mobile__underline-container"> | ||
<div class="navbar-mobile__underline-container__content-container"> | ||
<span></span> | ||
<span class="navbar-mobile__underline"></span> | ||
<span class="navbar-mobile__underline"></span> | ||
<mat-icon svgIcon="ktzh_menu_mobile" iconPositionEnd>launch</mat-icon> | ||
</button> | ||
<div class="navbar-mobile__underline-container"> | ||
<div class="navbar-mobile__underline-container__content-container"> | ||
<span></span> | ||
<span class="navbar-mobile__underline"></span> | ||
<span class="navbar-mobile__underline"></span> | ||
</div> | ||
</div> | ||
</div> | ||
</mat-toolbar> | ||
|
||
<ng-template #simplifiedPage> | ||
</mat-toolbar> | ||
} @else { | ||
<div class="navbar-mobile-simplified" [ngClass]="{'navbar-mobile-simplified--dev-mode': isDevModeActive}"> | ||
<button (click)="showMenu()" class="navbar-mobile-simplified__button" mat-icon-button> | ||
<mat-icon svgIcon="ktzh_menu_mobile"></mat-icon> | ||
</button> | ||
</div> | ||
</ng-template> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.