forked from hwrod/bostonhackfit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwakeup.html
73 lines (64 loc) · 2.46 KB
/
wakeup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Sleep with Friends</title>
<script src="js/jquery.js"></script>
<link href="js/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="js/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet">
<link href="css/bootstrap-slider.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<script>
function wakeup() {
return true;
}
</script>
<form action="dashboard.html" onsubmit="return wakeup()">
<!-- Mood Slider -->
<div class="moodSlider">
<h3>So, how was your sleep?</h3>
<p id="description"></p>
<script>
localStorage.setItem("description", ["On a scale from watching reality TV to completing a Spartan Race:", "On a scale from eating bananas to rock paper scissors:"]);
localStorage.descNum = parseInt(localStorage.descNum)+1;
desc = localStorage.getItem("description").split(",");
desc = desc[localStorage.descNum%(desc.length)];
console.log(localStorage.descNum)
$("#description").text(desc);
</script>
<input id="moodSleepSlider" data-slider-id='moodSleepSlider' type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="80"/>
</div>
<div class="startSleep">
<button type="submit" class="btn btn-default">Begin my day!</button>
</div>
</form>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type='text/javascript' src="js/bootstrap-slider.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
/* Example 1 */
$('#moodSleepSlider').slider({
formater: function(value) {
return 'Current value: ' + value;
}
});
});
</script>
</body>
</html>