Skip to content

Commit 0a2120d

Browse files
zacholausonvinit Kumar
authored andcommitted
add weather toggle
add ability to remove weather in layout options
1 parent 8680761 commit 0a2120d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ <h2>Seconds Toggle</h2>
191191
<label for="hide-seconds">Off</label>
192192
</div>
193193
</section>
194+
<section>
195+
<h2>Weather Toggle</h2>
196+
<div>
197+
<input type="radio" name="weather" id="weather-on" value="true" checked/>
198+
<label for="weather-on">On</label>
199+
</div>
200+
<div>
201+
<input type="radio" name="weather" id="weather-off" value="false"/>
202+
<label for="weather-off">Off</label>
203+
</div>
204+
</section>
194205
<button type="submit">SAVE</button>
195206
</form>
196207
</div>

js/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,10 @@ function style() {
888888
$('#main').addClass('no-seconds');
889889
}
890890

891+
// Remove weather
892+
if (!options.weather) {
893+
$('#main #weather').addClass('hidden');
894+
}
891895
});
892896
}
893897

0 commit comments

Comments
 (0)