Skip to content

Commit 102ca93

Browse files
committed
2 parents 8af4a13 + 2e22c85 commit 102ca93

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

codelab-style.html

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
}
120120

121121
.navbutton.prevbutton[disabled] {
122+
background: var(--google-codelab-fab-background);
123+
color: white;
122124
transform: scale(0);
123125
}
124126

google-codelab.html

+11-10
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
on-iron-localstorage-load="_stateLoaded">
6666
</iron-localstorage>
6767

68-
<paper-drawer-panel narrow="{{narrow}}" selected="{{currDrawer}}" id="drawer">
68+
<paper-drawer-panel narrow="{{_narrow}}" selected="{{currDrawer}}" id="drawer">
6969

7070
<div drawer>
7171
<paper-menu id="toc" selected="{{selected}}"
@@ -88,10 +88,10 @@
8888

8989
<paper-scroll-header-panel id="headerpanel" fixed main>
9090
<paper-toolbar>
91-
<template is="dom-if" if="{{narrow}}">
91+
<template is="dom-if" if="{{_narrow}}">
9292
<paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
9393
</template>
94-
<template is="dom-if" if="{{!narrow}}">
94+
<template is="dom-if" if="{{!_narrow}}">
9595
<paper-icon-button icon="arrow-back" on-tap="_goToHome"></paper-icon-button>
9696
</template>
9797
<h1 class="title">{{title}}</h1>
@@ -115,14 +115,14 @@ <h1 class="title">{{title}}</h1>
115115
</paper-fab>
116116

117117
<div>
118-
<template is="dom-if" if="{{_hideDoneFab(selected)}}">
118+
<template is="dom-if" if="{{_showNextFab(selected, steps)}}">
119119
<paper-fab icon="chevron-right" raised class="navbutton nextbutton"
120120
title="{{_nextFabTitle(selected)}}"
121121
on-tap="selectNext">
122122
</paper-fab>
123123
</template>
124124

125-
<template is="dom-if" if="{{!_hideDoneFab(selected)}}">
125+
<template is="dom-if" if="{{_showDoneFab(selected, steps)}}">
126126
<paper-fab icon="done" raised class="navbutton donebutton"
127127
on-tap="_goToHome" title="Complete codelab">
128128
</paper-fab>
@@ -459,13 +459,14 @@ <h2>Would you like to resume where you left off?</h2>
459459
},
460460

461461
_isLastStep: function(stepIndex) {
462-
if (isNaN(stepIndex) || !this.$.pages.items) {
463-
return true;
464-
}
465-
return !this.$.pages.items.length || stepIndex >= this.$.pages.items.length - 1;
462+
return !this.steps.length || stepIndex >= this.steps.length - 1;
463+
},
464+
465+
_showDoneFab: function(stepIndex, steps) {
466+
return this._isLastStep(stepIndex);
466467
},
467468

468-
_hideDoneFab: function(stepIndex) {
469+
_showNextFab: function(stepIndex, steps) {
469470
return !this._isLastStep(stepIndex);
470471
},
471472

0 commit comments

Comments
 (0)