Skip to content

Commit 6b3e570

Browse files
committed
Add time remaining to left nav
1 parent c4bbdb9 commit 6b3e570

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

codelab-style.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,18 @@
8383
margin: 0;
8484
}
8585

86-
#countdown iron-icon {
86+
.countdown iron-icon {
8787
margin-right: 3px;
88-
--iron-icon-fill-color: rgba(255, 255, 255, 0.8);
88+
}
89+
90+
:host(:not([theme="minimal"])) [drawer] .countdown {
91+
display: none;
92+
}
93+
94+
:host([theme="minimal"]) [drawer] .countdown {
95+
padding: 0 16px 16px 16px;
96+
font-style: italic;
97+
color: var(--paper-blue-500);
8998
}
9099

91100
#controls {

google-codelab.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@
7575

7676
<paper-drawer-panel id="drawer" narrow="{{_narrow}}" selected="{{currDrawer}}">
7777

78-
<div drawer class="layout vertical justified">
79-
<paper-menu id="toc" selected="{{selected}}"
78+
<div drawer class="layout vertical">
79+
<div title="Time remaining" hidden$="{{!_isPositiveNum(duration)}}"
80+
class="countdown layout horizontal">
81+
<iron-icon icon="schedule"></iron-icon> <span>{{remaining}}</span>
82+
</div>
83+
84+
<paper-menu id="toc" class="flex" selected="{{selected}}"
8085
on-iron-select="_allowCodelabComplete">
8186
<template is="dom-repeat" items="{{steps}}" strip-whitespace>
8287
<paper-item class$="{{_tocItemClass(selected, index)}}">
@@ -109,8 +114,8 @@
109114
<paper-icon-button icon="arrow-back" on-tap="_goToHome"></paper-icon-button>
110115
</template>
111116
<h1 class="title">{{title}}</h1>
112-
<div id="countdown" title="Time remaining" hidden$="{{!_isPositiveNum(duration)}}"
113-
class="layout horizontal">
117+
<div title="Time remaining" hidden$="{{!_isPositiveNum(duration)}}"
118+
class="countdown layout horizontal">
114119
<iron-icon icon="schedule"></iron-icon> <span>{{remaining}}</span>
115120
</div>
116121
</paper-toolbar>

0 commit comments

Comments
 (0)