-
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.
Merge pull request #3 from keks-code/dev
- Loading branch information
Showing
14 changed files
with
196 additions
and
9 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
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
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
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,46 @@ | ||
<mat-sidenav-container | ||
class="layout-container sidenav-container--modal-drawer"> | ||
<mat-sidenav | ||
#snav | ||
mode="over" | ||
fixedInViewport> | ||
<div class="sidenav-content-container"> | ||
<div class="pseudo-title sidenav-item" style="width: 80%"></div> | ||
<div class="pseudo-title sidenav-item" style="width: 70%"></div> | ||
<div class="pseudo-title sidenav-item" style="width: 75%"></div> | ||
<div class="pseudo-title sidenav-item" style="width: 55%"></div> | ||
<div class="pseudo-title sidenav-item" style="width: 65%"></div> | ||
|
||
<mat-divider></mat-divider> | ||
|
||
<div *ngFor="let nav of fillerNav" class="pseudo-title sidenav-item" style="width: 85%"></div> | ||
|
||
<mat-divider></mat-divider> | ||
|
||
<div class="pseudo-title sidenav-item" style="width: 70%"></div> | ||
<div class="pseudo-title sidenav-item" style="width: 40%"></div> | ||
<div class="pseudo-title sidenav-item" style="width: 75%"></div> | ||
</div> | ||
</mat-sidenav> | ||
<mat-sidenav-content> | ||
<mat-toolbar color="primary"> | ||
<button | ||
mat-icon-button | ||
(click)="snav.toggle()"> | ||
<mat-icon>menu</mat-icon> | ||
</button> | ||
|
||
<span>My Application</span> | ||
|
||
<span class="mat-toolbar-spacer"></span> | ||
|
||
<a mat-button | ||
routerLink="/"> | ||
<mat-icon class="mat-button__icon">home</mat-icon> | ||
<span>Home</span> | ||
</a> | ||
</mat-toolbar> | ||
|
||
<router-outlet></router-outlet> | ||
</mat-sidenav-content> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.layout-container { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
} | ||
|
||
.mat-toolbar-spacer { | ||
flex: 1 1 auto; | ||
} | ||
|
||
.sidenav-content-container { | ||
width: 256px; // Size is taken from Navigation drawer specs - https://material.io/components/navigation-drawer#specs | ||
padding: 32px 16px; | ||
box-sizing: border-box; // Fix. https://stackoverflow.com/a/67907083/8468354 | ||
|
||
::ng-deep .mat-divider-horizontal { | ||
position: relative ; | ||
left: -16px; | ||
width: calc(100% + 32px); | ||
margin-bottom: 24px; | ||
} | ||
} | ||
|
||
.sidenav-container--modal-drawer { | ||
z-index: unset; | ||
|
||
::ng-deep .mat-drawer-backdrop { | ||
z-index: 5; | ||
} | ||
|
||
::ng-deep .mat-sidenav-fixed { | ||
z-index: 6; | ||
} | ||
} | ||
|
||
.sidenav-item { | ||
display: block; | ||
margin-bottom: 24px; | ||
} |
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,17 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
|
||
@Component({ | ||
templateUrl: './layout204.component.html', | ||
styleUrls: ['./layout204.component.scss'] | ||
}) | ||
export class Layout204Component implements OnInit { | ||
|
||
fillerNav = Array.from({length: 3}, (_, i) => `Nav Item ${i + 1}`); | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
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
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,50 @@ | ||
<div class="a-c--1280 mdx-p--default"> | ||
|
||
<div class="card-container"> | ||
<mat-card> | ||
<mat-card-content> | ||
<h3 class="mat-display-1 mdx-mb--3">Layout #204</h3> | ||
<div class="rich-text mdx-mb--5 mat-typography"> | ||
<ul> | ||
<li> | ||
<strong>Key Components:</strong> <a href="https://material.angular.io/components/toolbar" target="_blank">Toolbar</a>, | ||
<a href="https://material.angular.io/components/sidenav" target="_blank">Sidenav</a>. This version of layout #204 doesn't | ||
use MDC Web's <a href="https://material.io/components/app-bars-top/web" target="_blank">@material/top-app-bar</a>. | ||
Therefore scrolling downward <strong>doesn't</strong> reveal the top app bar. I plan to create another version of this layout | ||
using <i>@material/top-app-bar</i>. | ||
</li> | ||
<li> | ||
<strong>Behavior:</strong> Behavior is the same in all three modes (desktop/tablet/phone): drawer is hidden to maximize | ||
space available for content. It can be revealed by clicking the menu icon in top app bar. | ||
|
||
<ul> | ||
<li>Handled scrolling of main content when modal drawer is opened: main content behind shim doesn't scroll.</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<strong>Comparison</strong> | ||
<ul> | ||
<li> | ||
<strong>#202</strong>: unlike #202, this one doesn't have a separate behavior for desktop mode. | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
</mat-card-content> | ||
<mat-card-footer class="mdx-p--2 text-center color-secondary-text"> | ||
<div> | ||
<span class="material-icons mdx-mr--1">desktop_windows</span> | ||
<span class="material-icons mdx-mr--1">tablet_android</span> | ||
<span class="material-icons mdx-mr--1">smartphone</span> | ||
</div> | ||
<div class="mat-caption"> | ||
Check it out on desktop, tablet and phone. | ||
</div> | ||
</mat-card-footer> | ||
</mat-card> | ||
</div> | ||
|
||
<dummy-page-content></dummy-page-content> | ||
|
||
</div> |
Empty file.
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,14 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
templateUrl: './layout204.page.html', | ||
styleUrls: ['./layout204.page.scss'] | ||
}) | ||
export class Layout204Page implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |