Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 6ea6e78

Browse files
authored
Fix plunkers and add tabs to the site (#70)
* Tab example * Fix plunker, update examples * Add example sources to assets/ so that they can be served directly for plunker * Footer font-size descrease
1 parent 039dd9a commit 6ea6e78

File tree

151 files changed

+1607
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1607
-36
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
},
1717
"private": true,
1818
"dependencies": {
19-
"@angular/common": "^2.4.0",
20-
"@angular/compiler": "^2.4.0",
21-
"@angular/core": "^2.4.0",
22-
"@angular/forms": "^2.4.0",
23-
"@angular/http": "^2.4.0",
19+
"@angular/common": "^2.4.1",
20+
"@angular/compiler": "^2.4.1",
21+
"@angular/core": "^2.4.1",
22+
"@angular/forms": "^2.4.1",
23+
"@angular/http": "^2.4.1",
2424
"@angular/material": "angular/material2-builds",
25-
"@angular/platform-browser": "^2.4.0",
26-
"@angular/platform-browser-dynamic": "^2.4.0",
25+
"@angular/platform-browser": "^2.4.1",
26+
"@angular/platform-browser-dynamic": "^2.4.1",
2727
"@angular/router": "~3.2.3",
2828
"core-js": "^2.4.1",
2929
"fs-extra": "^1.0.0",
@@ -34,7 +34,7 @@
3434
"zone.js": "^0.7.4"
3535
},
3636
"devDependencies": {
37-
"@angular/compiler-cli": "^2.4.0",
37+
"@angular/compiler-cli": "^2.4.1",
3838
"@types/jasmine": "^2.2.30",
3939
"@types/node": "^6.0.42",
4040
"angular-cli": "1.0.0-beta.24",

src/app/examples/example-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const EXAMPLE_COMPONENTS = {
147147
},
148148
'snack-bar-overview': {title: 'Basic snack-bar', component: SnackBarOverviewExample},
149149
'tabs-overview': {title: 'Basic tabs', component: TabsOverviewExample},
150-
'tabs-template-label': {title: 'Tabs with a label template', component: TabsTemplateLabelExample},
150+
'tabs-template-label': {title: 'Coming soon!', component: TabsTemplateLabelExample},
151151
'toolbar-multirow': {title: 'Multi-row toolbar', component: ToolbarMultirowExample},
152152
'toolbar-overview': {title: 'basic toolbar', component: ToolbarOverviewExample},
153153
'tooltip-overview': {title: 'Basic tooltip', component: TooltipOverviewExample},

src/app/examples/slider-configurable/slider-configurable-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Component, ViewEncapsulation} from '@angular/core';
22

33

44
@Component({
5-
selector: 'configurable-slider-example',
5+
selector: 'slider-configurable-example',
66
templateUrl: './slider-configurable-example.html',
77
styleUrls: ['./slider-configurable-example.css'],
88
encapsulation: ViewEncapsulation.None,
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
<md-tab-group>
2-
<md-tab>
3-
<template md-tab-label>
4-
I'm a <em>fancy</em> tab <md-icon>sentiment_very_satisfied</md-icon>
5-
</template>
6-
Content 1
7-
</md-tab>
8-
<md-tab label="Tab 2">Content 2</md-tab>
9-
</md-tab-group>
1+
More examples coming soon!

src/app/shared/documentation-items/documentation-items.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const DOCS = [
4444
{id: 'list', name: 'List', examples: ['list-sections']},
4545
{id: 'grid-list', name: 'Grid list', examples: ['grid-list-dynamic']},
4646
{id: 'card', name: 'Card', examples: ['card-fancy']},
47+
{id: 'tabs', name: 'Tabs', examples: ['tabs-template-label']},
4748
]
4849
},
4950
{

src/app/shared/footer/footer.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.docs-footer {
22
margin-top: 40px;
3-
padding: 20px;
3+
padding: 15px;
44
text-align: center;
5+
font-size: 12px;
56
}

src/assets/documents/overview/tabs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
of the header, pagination controls appear to let the user scroll left and right across the labels.</p>
55
<p>The active tab may be set using the <code>selectedIndex</code> input or when the user selects one of the
66
tab labels in the header.</p>
7-
<div material-docs-example="tab-overview"></div>
7+
<div material-docs-example="tabs-overview"></div>
88
<h3 id="events">Events</h3>
99
<p>The <code>selectChange</code> output event is emitted when the active tab changes. </p>
1010
<p>The <code>focusChange</code> output event is emitted when the user puts focus on any of the tab labels in

src/assets/examples/card-fancy-example-css.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
}
44

55
<span class="hljs-selector-class">.example-header-image</span> {
6-
<span class="hljs-attribute">background-image</span>: <span class="hljs-built_in">url</span>(<span class="hljs-string">'shiba1.jpg'</span>);
6+
<span class="hljs-attribute">background-image</span>: <span class="hljs-built_in">url</span>(<span class="hljs-string">'assets/img/examples/shiba1.jpg'</span>);
77
<span class="hljs-attribute">background-size</span>: cover;
88
}

src/assets/examples/card-fancy-example-html.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<span class="hljs-tag">&lt;<span class="hljs-name">md-card-title</span>&gt;</span>Shiba Inu<span class="hljs-tag">&lt;/<span class="hljs-name">md-card-title</span>&gt;</span>
55
<span class="hljs-tag">&lt;<span class="hljs-name">md-card-subtitle</span>&gt;</span>Dog Breed<span class="hljs-tag">&lt;/<span class="hljs-name">md-card-subtitle</span>&gt;</span>
66
<span class="hljs-tag">&lt;/<span class="hljs-name">md-card-header</span>&gt;</span>
7-
<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">md-card-image</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"shiba2.jpg"</span>&gt;</span>
7+
<span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">md-card-image</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"assets/img/examples/shiba2.jpg"</span>&gt;</span>
88
<span class="hljs-tag">&lt;<span class="hljs-name">md-card-content</span>&gt;</span>
99
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
1010
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<span class="hljs-tag">&lt;<span class="hljs-name">md-icon</span> <span class="hljs-attr">svgSrc</span>=<span class="hljs-string">"ic_3d_rotation_black_24px.svg"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">md-icon</span>&gt;</span>
1+
<span class="hljs-tag">&lt;<span class="hljs-name">md-icon</span> <span class="hljs-attr">svgIcon</span>=<span class="hljs-string">"thumbs-up"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">md-icon</span>&gt;</span>
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
<span class="hljs-keyword">import</span> {Component} from <span class="hljs-string">'@angular/core'</span>;
2+
<span class="hljs-keyword">import</span> {DomSanitizer} from <span class="hljs-string">'@angular/platform-browser'</span>;
3+
<span class="hljs-keyword">import</span> {MdIconRegistry} from <span class="hljs-string">'@angular/material'</span>;
24

35

46
<span class="hljs-meta">@Component</span>({
57
selector: <span class="hljs-string">'icon-svg-example'</span>,
68
templateUrl: <span class="hljs-string">'./icon-svg-example.html'</span>,
79
})
8-
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> IconSvgExample {}
10+
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> IconSvgExample {
11+
<span class="hljs-keyword">constructor</span>(<span class="hljs-params">iconRegistry: MdIconRegistry, sanitizer: DomSanitizer</span>) {
12+
iconRegistry.addSvgIcon(
13+
<span class="hljs-string">'thumbs-up'</span>,
14+
sanitizer.bypassSecurityTrustResourceUrl(<span class="hljs-string">'assets/img/examples/thumbup-icon.svg'</span>));
15+
}
16+
}

src/assets/examples/slider-configurable-example-ts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
<span class="hljs-meta">@Component</span>({
5-
selector: <span class="hljs-string">'configurable-slider-example'</span>,
5+
selector: <span class="hljs-string">'slider-configurable-example'</span>,
66
templateUrl: <span class="hljs-string">'./slider-configurable-example.html'</span>,
77
styleUrls: [<span class="hljs-string">'./slider-configurable-example.css'</span>],
88
encapsulation: ViewEncapsulation.None,
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
<span class="hljs-tag">&lt;<span class="hljs-name">md-tab-group</span>&gt;</span>
2-
<span class="hljs-tag">&lt;<span class="hljs-name">md-tab</span>&gt;</span>
3-
<span class="hljs-tag">&lt;<span class="hljs-name">template</span> <span class="hljs-attr">md-tab-label</span>&gt;</span>
4-
I'm a <span class="hljs-tag">&lt;<span class="hljs-name">em</span>&gt;</span>fancy<span class="hljs-tag">&lt;/<span class="hljs-name">em</span>&gt;</span> tab <span class="hljs-tag">&lt;<span class="hljs-name">md-icon</span>&gt;</span>sentiment_very_satisfied<span class="hljs-tag">&lt;/<span class="hljs-name">md-icon</span>&gt;</span>
5-
<span class="hljs-tag">&lt;/<span class="hljs-name">template</span>&gt;</span>
6-
Content 1
7-
<span class="hljs-tag">&lt;/<span class="hljs-name">md-tab</span>&gt;</span>
8-
<span class="hljs-tag">&lt;<span class="hljs-name">md-tab</span> <span class="hljs-attr">label</span>=<span class="hljs-string">"Tab 2"</span>&gt;</span>Content 2<span class="hljs-tag">&lt;/<span class="hljs-name">md-tab</span>&gt;</span>
9-
<span class="hljs-tag">&lt;/<span class="hljs-name">md-tab-group</span>&gt;</span>
1+
More examples coming soon!
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<button md-button>Click me!</button>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'button-overview-example',
6+
templateUrl: './button-overview-example.html',
7+
})
8+
export class ButtonOverviewExample {}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.example-selected-value {
2+
margin: 15px 0;
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<md-button-toggle-group #group="mdButtonToggleGroup">
2+
<md-button-toggle value="left">
3+
<md-icon>format_align_left</md-icon>
4+
</md-button-toggle>
5+
<md-button-toggle value="center">
6+
<md-icon>format_align_center</md-icon>
7+
</md-button-toggle>
8+
<md-button-toggle value="right">
9+
<md-icon>format_align_right</md-icon>
10+
</md-button-toggle>
11+
<md-button-toggle value="justify" disabled>
12+
<md-icon>format_align_justify</md-icon>
13+
</md-button-toggle>
14+
</md-button-toggle-group>
15+
<div class="example-selected-value">Selected value: {{group.value}}</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'button-toggle-exclusive-example',
6+
templateUrl: './button-toggle-exclusive-example.html',
7+
styleUrls: ['./button-toggle-exclusive-example.css'],
8+
})
9+
export class ButtonToggleExclusiveExample {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<md-button-toggle>Toggle me!</md-button-toggle>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'button-toggle-overview-example',
6+
templateUrl: './button-toggle-overview-example.html',
7+
})
8+
export class ButtonToggleOverviewExample {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.example-container {
2+
width: 500px;
3+
}
4+
5+
.example-button-row {
6+
display: flex;
7+
align-items: center;
8+
justify-content: space-around;
9+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="example-container">
2+
<h3>Normal Buttons</h3>
3+
<div class="button-row">
4+
<button md-button>Flat button</button>
5+
<button md-raised-button>Raised button</button>
6+
<button md-fab><md-icon>check</md-icon></button>
7+
<button md-mini-fab><md-icon>check</md-icon></button>
8+
</div>
9+
10+
<h3>Link Buttons</h3>
11+
<div class="example-button-row">
12+
<a md-button routerLink=".">Flat button</a>
13+
<a md-raised-button routerLink=".">Raised button</a>
14+
<a md-fab routerLink="."><md-icon>check</md-icon></a>
15+
<a md-mini-fab routerLink="."><md-icon>check</md-icon></a>
16+
</div>
17+
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'button-types-example',
6+
templateUrl: './button-types-example.html',
7+
styleUrls: ['./button-types-example.css'],
8+
})
9+
export class ButtonTypesExample {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.example-card {
2+
width: 400px;
3+
}
4+
5+
.example-header-image {
6+
background-image: url('assets/img/examples/shiba1.jpg');
7+
background-size: cover;
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<md-card class="example-card">
2+
<md-card-header>
3+
<div md-card-avatar class="example-header-image"></div>
4+
<md-card-title>Shiba Inu</md-card-title>
5+
<md-card-subtitle>Dog Breed</md-card-subtitle>
6+
</md-card-header>
7+
<img md-card-image src="assets/img/examples/shiba2.jpg">
8+
<md-card-content>
9+
<p>
10+
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
11+
A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally
12+
bred for hunting.
13+
</p>
14+
</md-card-content>
15+
<md-card-actions>
16+
<button md-button>LIKE</button>
17+
<button md-button>SHARE</button>
18+
</md-card-actions>
19+
</md-card>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'card-fancy-example',
6+
templateUrl: './card-fancy-example.html',
7+
styleUrls: ['./card-fancy-example.css'],
8+
})
9+
export class CardFancyExample {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<md-card>Simple card</md-card>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'card-overview-example',
6+
templateUrl: './card-overview-example.html',
7+
})
8+
export class CardOverviewExample {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.example-h2 {
2+
margin: 10px;
3+
}
4+
5+
.example-section {
6+
display: flex;
7+
align-content: center;
8+
align-items: center;
9+
height: 60px;
10+
}
11+
12+
.example-margin {
13+
margin: 0 10px;
14+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<md-card>
2+
<md-card-content>
3+
<h2 class="example-h2">Checkbox configuration</h2>
4+
5+
<section class="example-section">
6+
<md-checkbox class="example-margin" [(ngModel)]="checked">Checked</md-checkbox>
7+
<md-checkbox class="example-margin" [(ngModel)]="indeterminate">Indeterminate</md-checkbox>
8+
</section>
9+
10+
<section class="example-section">
11+
<label class="example-margin">Align:</label>
12+
<md-radio-group [(ngModel)]="align">
13+
<md-radio-button class="example-margin" value="start">Start</md-radio-button>
14+
<md-radio-button class="example-margin" value="end">End</md-radio-button>
15+
</md-radio-group>
16+
</section>
17+
18+
<section class="example-section">
19+
<md-checkbox class="example-margin" [(ngModel)]="disabled">Disabled</md-checkbox>
20+
</section>
21+
</md-card-content>
22+
</md-card>
23+
24+
<md-card class="result">
25+
<md-card-content>
26+
<h2 class="example-h2">Result</h2>
27+
28+
<section class="example-section">
29+
<md-checkbox
30+
class="example-margin"
31+
[checked]="checked"
32+
[indeterminate]="indeterminate"
33+
[align]="align"
34+
[disabled]="disabled">
35+
I'm a checkbox
36+
</md-checkbox>
37+
</section>
38+
</md-card-content>
39+
</md-card>
40+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'checkbox-configurable-example',
6+
templateUrl: './checkbox-configurable-example.html',
7+
styleUrls: ['./checkbox-configurable-example.css'],
8+
})
9+
export class CheckboxConfigurableExample {
10+
checked = false;
11+
indeterminate = false;
12+
align = 'start';
13+
disabled = false;
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<md-checkbox>Check me!</md-checkbox>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'checkbox-overview-example',
6+
templateUrl: './checkbox-overview-example.html',
7+
})
8+
export class CheckboxOverviewExample {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/** No CSS for this example */
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<md-chip-list>
2+
<md-chip>One fish</md-chip>
3+
<md-chip>Two fish</md-chip>
4+
<md-chip color="primary" selected="true">Primary fish</md-chip>
5+
<md-chip color="accent" selected="true">Accent fish</md-chip>
6+
</md-chip-list>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'chips-overview-example',
6+
templateUrl: './chips-overview-example.html',
7+
})
8+
export class ChipsOverviewExample {}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
md-chip {
2+
max-width: 200px;
3+
}

0 commit comments

Comments
 (0)