This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add basic card and toolbar examples
- scaffolding for examples page. mirror the content of angular-material for 1.x as closely as possible. use visual comparison as a gauge for whether the styles are translating as expected.
- Loading branch information
1 parent
bb4346f
commit b9ff27c
Showing
21 changed files
with
804 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<md-toolbar class="md-whiteframe-z1"> | ||
<div class="md-toolbar-tools"> | ||
<button md-button class="md-icon-button" aria-label="Settings"> | ||
<i md-icon class="md-light">menu</i> | ||
</button> | ||
<h2> | ||
<span>Toolbar with Icon Buttons</span> | ||
</h2> | ||
<span flex></span> | ||
<button md-button class="md-icon-button" aria-label="Favorite"> | ||
<i md-icon class="md-light">favorite</i> | ||
</button> | ||
<button md-button class="md-icon-button" aria-label="More"> | ||
<i md-icon class="md-light">more_vert</i> | ||
</button> | ||
</div> | ||
</md-toolbar> | ||
|
||
<md-content layout-padding> | ||
|
||
<h1>Toolbar</h1> | ||
<example name="Basic Usage"> | ||
<toolbar-basic-usage></toolbar-basic-usage> | ||
</example> | ||
|
||
|
||
|
||
<h1>Card</h1> | ||
<example name="Basic Usage"> | ||
<card-basic-usage></card-basic-usage> | ||
</example> | ||
|
||
<example name="Action Buttons"> | ||
<card-action-buttons></card-action-buttons> | ||
</example> | ||
|
||
<example name="In Card Actions"> | ||
<card-in-card-actions></card-in-card-actions> | ||
</example> | ||
|
||
</md-content> |
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,20 @@ | ||
@import "font/font"; | ||
|
||
@import "ng2-material/all"; | ||
@import "examples/example"; | ||
|
||
demos-app { | ||
.md-toolbar { | ||
max-width: 200px; | ||
} | ||
> md-content { | ||
max-width: 800px; | ||
> h1 { | ||
margin-top:40px; | ||
color: md-color($md-primary,900); | ||
} | ||
.card-media { | ||
background-color: md-color($md-background); | ||
} | ||
} | ||
} |
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 @@ | ||
import {Component, View} from 'angular2/core'; | ||
import {bootstrap} from 'angular2/angular2'; | ||
import {MATERIAL_DIRECTIVES} from './ng2-material/all'; | ||
|
||
import {DEMO_DIRECTIVES} from './examples/all'; | ||
import Example from './examples/example'; | ||
|
||
|
||
|
||
@Component({ | ||
selector: 'demos-app' | ||
}) | ||
@View({ | ||
templateUrl: 'app.html', | ||
directives: [MATERIAL_DIRECTIVES, Example, DEMO_DIRECTIVES] | ||
}) | ||
export class DemosApp { | ||
constructor() { | ||
console.log('bam'); | ||
} | ||
} | ||
|
||
bootstrap(DemosApp); |
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,18 @@ | ||
import {CONST_EXPR, Type} from 'angular2/src/facade/lang'; | ||
import CardBasicUsage from './components/card/basic_usage'; | ||
import CardInCardActions from './components/card/in_card_actions'; | ||
import CardActionButtons from './components/card/card_action_buttons'; | ||
|
||
|
||
|
||
import ToolbarBasicUsage from './components/toolbar/basic_usage'; | ||
|
||
/** | ||
* Collection of Material Design component directives. | ||
*/ | ||
export const DEMO_DIRECTIVES: Type[] = CONST_EXPR([ | ||
CardBasicUsage, CardInCardActions, CardActionButtons, | ||
ToolbarBasicUsage | ||
]); | ||
|
||
export * from './example'; |
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 @@ | ||
export {MATERIAL_DIRECTIVES} from '../ng2-material/all'; |
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,73 @@ | ||
<md-content class="md-padding" layout="row" layout-wrap layout-align="center start"> | ||
<div flex="50" layout="column"> | ||
<md-card> | ||
<md-card-title> | ||
<md-card-title-text> | ||
<span class="md-headline">Card with image</span> | ||
<span class="md-subhead">Large</span> | ||
</md-card-title-text> | ||
<md-card-title-media> | ||
<div class="md-media-lg card-media"></div> | ||
</md-card-title-media> | ||
</md-card-title> | ||
<md-card-actions layout="row" layout-align="end center"> | ||
<button md-button>Action 1</button> | ||
<button md-button>Action 2</button> | ||
</md-card-actions> | ||
</md-card> | ||
<md-card> | ||
<md-card-title> | ||
<md-card-title-text> | ||
<span class="md-headline">Card with image</span> | ||
<span class="md-subhead">Extra Large</span> | ||
</md-card-title-text> | ||
</md-card-title> | ||
<md-card-content layout="row" layout-align="space-between"> | ||
<div class="md-media-xl card-media"></div> | ||
<md-card-actions layout="column"> | ||
<button md-button class="md-icon-button" aria-label="Favorite"> | ||
<i md-icon>favorite</i> | ||
</button> | ||
<button md-button class="md-icon-button" aria-label="Settings"> | ||
<i md-icon>menu</i> | ||
</button> | ||
<button md-button class="md-icon-button" aria-label="Share"> | ||
<i md-icon>share_arrow</i> | ||
</button> | ||
</md-card-actions> | ||
</md-card-content> | ||
</md-card> | ||
</div> | ||
<div flex="50" layout="column"> | ||
<md-card> | ||
<md-card-title> | ||
<md-card-title-text> | ||
<span class="md-headline">Card with image</span> | ||
<span class="md-subhead">Small</span> | ||
</md-card-title-text> | ||
<md-card-title-media> | ||
<div class="md-media-sm card-media"></div> | ||
</md-card-title-media> | ||
</md-card-title> | ||
<md-card-actions layout="row" layout-align="end center"> | ||
<button md-button>Action 1</button> | ||
<button md-button>Action 2</button> | ||
</md-card-actions> | ||
</md-card> | ||
<md-card> | ||
<md-card-title> | ||
<md-card-title-text> | ||
<span class="md-headline">Card with image</span> | ||
<span class="md-subhead">Medium</span> | ||
</md-card-title-text> | ||
<md-card-title-media> | ||
<div class="md-media-md card-media"></div> | ||
</md-card-title-media> | ||
</md-card-title> | ||
<md-card-actions layout="row" layout-align="end center"> | ||
<button md-button>Action 1</button> | ||
<button md-button>Action 2</button> | ||
</md-card-actions> | ||
</md-card> | ||
</div> | ||
</md-content> |
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,8 @@ | ||
import {View, Component} from 'angular2/core'; | ||
import {MATERIAL_DIRECTIVES} from '../../base'; | ||
|
||
@Component({selector: 'card-basic-usage'}) | ||
@View({templateUrl: 'examples/components/card/basic_usage.html', directives: [MATERIAL_DIRECTIVES]}) | ||
export default class DemoView { | ||
public imagePath: string = 'public/images/washedout.png'; | ||
} |
Oops, something went wrong.