forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(nav): implement new left nav * feat(nav): cont imp left nav * chore(nit): address PR feedback * fix: window scroll event not working * fix: footer spacing causing scrollbar overflows * chore: nit feedback
- Loading branch information
Showing
10 changed files
with
277 additions
and
96 deletions.
There are no files selected for viewing
51 changes: 32 additions & 19 deletions
51
src/app/pages/component-sidenav/_component-sidenav-theme.scss
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="docs-component-viewer-nav"> | ||
<div class="docs-component-viewer-nav-content"> | ||
<nav *ngFor="let category of docItems.getCategories((params | async)?.section); let last = last;"> | ||
<button (click)="toggleExpand(category.id)" | ||
[attr.aria-label]="category.name + ', section toggle'" | ||
[attr.aria-controls]="'panel-' + category.id" | ||
[attr.aria-expanded]="getExpanded(category.id)"> | ||
{{category.name}} | ||
<mat-icon *ngIf="!getExpanded(category.id)">keyboard_arrow_down</mat-icon> | ||
<mat-icon *ngIf="getExpanded(category.id)">keyboard_arrow_up</mat-icon> | ||
</button> | ||
<ul [@bodyExpansion]="_getExpandedState(category.id)" id="panel-{{category.id}}"> | ||
<li *ngFor="let component of category.items"> | ||
<a [routerLink]="'/' + (params | async)?.section+ '/' + component.id" | ||
routerLinkActive="docs-component-viewer-sidenav-item-selected"> | ||
{{component.name}} | ||
</a> | ||
</li> | ||
</ul> | ||
<hr *ngIf="!last" /> | ||
</nav> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<mat-sidenav-container class="docs-component-viewer-sidenav-container"> | ||
<!-- If on small screen, menu resides in drawer --> | ||
<mat-sidenav #sidenav class="docs-component-viewer-sidenav" | ||
*ngIf="isScreenSmall()" | ||
[opened]="!isScreenSmall()" | ||
[mode]="isScreenSmall() ? 'over' : 'side'" | ||
[fixedInViewport]="isScreenSmall()" | ||
fixedTopGap="92"> | ||
<nav *ngFor="let category of docItems.getCategories((params | async)?.section)"> | ||
<h3>{{category.name}}</h3> | ||
<ul> | ||
<li *ngFor="let component of category.items"> | ||
<a [routerLink]="'/' + (params | async)?.section+ '/' + component.id" | ||
routerLinkActive="docs-component-viewer-sidenav-item-selected"> | ||
{{component.name}} | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<app-component-nav [params]="params"></app-component-nav> | ||
</mat-sidenav> | ||
|
||
<div class="docs-component-sidenav-content"> | ||
<component-page-header (toggleSidenav)="sidenav.toggle()"></component-page-header> | ||
<router-outlet></router-outlet> | ||
<app-footer></app-footer> | ||
<div class="docs-component-sidenav-inner-content"> | ||
<div class="docs-component-sidenav-body-content"> | ||
<!-- If on large screen, menu resides to left of content --> | ||
<app-component-nav | ||
*ngIf="!isScreenSmall()" | ||
[params]="params"> | ||
</app-component-nav> | ||
<router-outlet></router-outlet> | ||
</div> | ||
<app-footer></app-footer> | ||
</div> | ||
</div> | ||
</mat-sidenav-container> |
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.