-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(navigation-drawer): ability to override toolbar content (#778)
closes #774
- Loading branch information
1 parent
5993f7e
commit 1a7c71b
Showing
3 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
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
39 changes: 21 additions & 18 deletions
39
src/platform/core/layout/navigation-drawer/navigation-drawer.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,27 +1,30 @@ | ||
<md-toolbar [color]="color" [style.background-image]="backgroundImage" [class.td-toolbar-background]="!!isBackgroundAvailable"> | ||
<div layout="column" flex> | ||
<span *ngIf="icon || logo || sidenavTitle" | ||
[class.cursor-pointer]="routerEnabled" | ||
(click)="handleNavigationClick()" | ||
layout="row" | ||
layout-align="start center"> | ||
<md-icon *ngIf="icon">{{icon}}</md-icon> | ||
<md-icon *ngIf="logo && !icon" class="md-icon-logo" [svgIcon]="logo"></md-icon> | ||
<span *ngIf="sidenavTitle" class="md-subhead">{{sidenavTitle}}</span> | ||
</span> | ||
<div class="md-body-2" *ngIf="email && name">{{name}}</div> | ||
<div class="md-body-1" layout="row" href *ngIf="email || name" (click)="toggleMenu()"> | ||
<span flex>{{email || name}}</span> | ||
<button md-icon-button class="md-icon-button-mini" *ngIf="isMenuAvailable"> | ||
<md-icon *ngIf="!menuToggled">arrow_drop_down</md-icon> | ||
<md-icon *ngIf="menuToggled">arrow_drop_up</md-icon> | ||
</button> | ||
</div> | ||
<ng-content select="[td-navigation-drawer-toolbar]"></ng-content> | ||
<ng-container *ngIf="!isCustomToolbar"> | ||
<span *ngIf="icon || logo || sidenavTitle" | ||
[class.cursor-pointer]="routerEnabled" | ||
(click)="handleNavigationClick()" | ||
layout="row" | ||
layout-align="start center"> | ||
<md-icon *ngIf="icon">{{icon}}</md-icon> | ||
<md-icon *ngIf="logo && !icon" class="md-icon-logo" [svgIcon]="logo"></md-icon> | ||
<span *ngIf="sidenavTitle" class="md-subhead">{{sidenavTitle}}</span> | ||
</span> | ||
<div class="md-body-2" *ngIf="email && name">{{name}}</div> | ||
<div class="md-body-1" layout="row" href *ngIf="email || name" (click)="toggleMenu()"> | ||
<span flex>{{email || name}}</span> | ||
<button md-icon-button class="md-icon-button-mini" *ngIf="isMenuAvailable"> | ||
<md-icon *ngIf="!menuToggled">arrow_drop_down</md-icon> | ||
<md-icon *ngIf="menuToggled">arrow_drop_up</md-icon> | ||
</button> | ||
</div> | ||
</ng-container> | ||
</div> | ||
</md-toolbar> | ||
<div [@tdCollapse]="menuToggled"> | ||
<ng-content></ng-content> | ||
</div> | ||
<div [@tdCollapse]="!menuToggled"> | ||
<ng-content select="[td-navigation-drawer-menu]"></ng-content> | ||
</div> | ||
</div> |
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