Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 5d7f0f2

Browse files
author
Arthur Evans
committed
Merge pull request #12 from Polymer/tutorial-updates
Tutorial updates
2 parents c906514 + 63a9b63 commit 5d7f0f2

7 files changed

Lines changed: 24 additions & 33 deletions

File tree

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "components"
3+
}

finished/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
background: #03a9f4;
3030
color: white;
3131
}
32-
paper-tabs {
32+
#tabs {
3333
width: 100%;
34+
margin: 0;
3435
-webkit-user-select: none;
3536
-moz-user-select: none;
3637
-ms-user-select: none;
@@ -41,7 +42,7 @@
4142
margin: 50px auto;
4243
}
4344
@media (min-width: 481px) {
44-
paper-tabs {
45+
#tabs {
4546
width: 200px;
4647
}
4748
.container {
@@ -54,7 +55,7 @@
5455
<body unresolved touch-action="auto">
5556
<core-header-panel>
5657
<core-toolbar>
57-
<paper-tabs selected="all" valueattr="name" self-end>
58+
<paper-tabs id="tabs" selected="all" valueattr="name" self-end>
5859
<paper-tab name="all">ALL</paper-tab>
5960
<paper-tab name="favorites">FAVORITES</paper-tab>
6061
</paper-tabs>

finished/post-card.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
<core-icon-button
4646
id="favicon"
4747
icon="favorite"
48-
on-tap="{{favoriteTapped}}">
49-
</core-icon-button>
48+
on-tap="{{favoriteTapped}}"></core-icon-button>
5049
<content></content>
5150
</template>
5251
<script>

starter/index.html

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,12 @@
1313
background-color: #E5E5E5;
1414
font-family: 'RobotoDraft', sans-serif;
1515
}
16-
core-header-panel {
17-
height: 100%;
18-
overflow: auto;
19-
-webkit-overflow-scrolling: touch;
20-
}
21-
core-toolbar {
22-
background: #03a9f4;
23-
color: white;
24-
}
25-
paper-tabs {
26-
width: 100%;
27-
-webkit-user-select: none;
28-
-moz-user-select: none;
29-
-ms-user-select: none;
30-
user-select: none;
31-
}
3216
.container {
3317
width: 80%;
3418
margin: 50px auto;
3519
}
3620
@media (min-width: 481px) {
37-
paper-tabs {
21+
#tabs {
3822
width: 200px;
3923
}
4024
.container {

step-1/index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
background: #03a9f4;
2929
color: white;
3030
}
31-
paper-tabs {
31+
#tabs {
3232
width: 100%;
33+
margin: 0;
3334
-webkit-user-select: none;
3435
-moz-user-select: none;
3536
-ms-user-select: none;
@@ -40,7 +41,7 @@
4041
margin: 50px auto;
4142
}
4243
@media (min-width: 481px) {
43-
paper-tabs {
44+
#tabs {
4445
width: 200px;
4546
}
4647
.container {
@@ -53,7 +54,7 @@
5354
<body unresolved touch-action="auto">
5455
<core-header-panel>
5556
<core-toolbar>
56-
<paper-tabs selected="all" valueattr="name" self-end>
57+
<paper-tabs id="tabs" selected="all" valueattr="name" self-end>
5758
<paper-tab name="all">ALL</paper-tab>
5859
<paper-tab name="favorites">FAVORITES</paper-tab>
5960
</paper-tabs>
@@ -65,7 +66,8 @@
6566

6667
<script>
6768
var tabs = document.querySelector('paper-tabs');
68-
tabs.addEventListener('core-select', function() {
69+
tabs.addEventListener('core-select', function(e) {
70+
console.log("tab change: " + e.target.getAttribute('name') +" selected = " + e.detail.isSelected);
6971
console.log("Selected: " + tabs.selected);
7072
});
7173
</script>

step-2/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
background: #03a9f4;
3030
color: white;
3131
}
32-
paper-tabs {
32+
#tabs {
3333
width: 100%;
34+
margin: 0;
3435
-webkit-user-select: none;
3536
-moz-user-select: none;
3637
-ms-user-select: none;
@@ -41,7 +42,7 @@
4142
margin: 50px auto;
4243
}
4344
@media (min-width: 481px) {
44-
paper-tabs {
45+
#tabs {
4546
width: 200px;
4647
}
4748
.container {
@@ -54,7 +55,7 @@
5455
<body unresolved touch-action="auto">
5556
<core-header-panel>
5657
<core-toolbar>
57-
<paper-tabs selected="all" valueattr="name" self-end>
58+
<paper-tabs id="tabs" selected="all" valueattr="name" self-end>
5859
<paper-tab name="all">ALL</paper-tab>
5960
<paper-tab name="favorites">FAVORITES</paper-tab>
6061
</paper-tabs>
@@ -64,7 +65,7 @@
6465
<post-card>
6566
<img src="../images/avatar-07.svg" width="70" height="70">
6667
<h2>Another Developer</h2>
67-
<h3>I'm composing with shadow DOM!</h3>
68+
<p>I'm composing with shadow DOM!</p>
6869
</post-card>
6970
</div>
7071
</core-header-panel>

step-3/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
background: #03a9f4;
3030
color: white;
3131
}
32-
paper-tabs {
32+
#tabs {
3333
width: 100%;
34+
margin: 0;
3435
-webkit-user-select: none;
3536
-moz-user-select: none;
3637
-ms-user-select: none;
@@ -41,7 +42,7 @@
4142
margin: 50px auto;
4243
}
4344
@media (min-width: 481px) {
44-
paper-tabs {
45+
#tabs {
4546
width: 200px;
4647
}
4748
.container {
@@ -54,7 +55,7 @@
5455
<body unresolved touch-action="auto">
5556
<core-header-panel>
5657
<core-toolbar>
57-
<paper-tabs selected="all" valueattr="name" self-end>
58+
<paper-tabs id="tabs" selected="all" valueattr="name" self-end>
5859
<paper-tab name="all">ALL</paper-tab>
5960
<paper-tab name="favorites">FAVORITES</paper-tab>
6061
</paper-tabs>

0 commit comments

Comments
 (0)