-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
196 lines (160 loc) · 4.34 KB
/
index.html
File metadata and controls
196 lines (160 loc) · 4.34 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<html>
<head>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.timers-1.2.js"></script>
<style>
body {
opacity:1;
}
div#header {
background-color:black;
color:white;
padding:15px 0;
border-radius: 0 0 5px 5px;
}
h1 {
color:white;
}
div#exerciseTitle{
text-align:center;
height:100px;
}
div#excerciseInProgress{
text-align:center;
}
h2 {
font-size:67px;
line-height:67px;
text-align:center;
}
div#clock{
font-size:37pt;
text-align:center;
}
div#clock div{
padding:30px 0;
}
div#controls input {
float:right;
margin-right:15px;
}
div.exercise {
width:9%;
margin:0 0.5%;
background-color:gray;
overflow:hidden;
float:left;
height:15px;
}
div.view {
padding: 30px 0;
}
div#timeline{
position:absolute;
bottom:0;
padding-bottom:15px;
}
</style>
<script type="text/javascript">
$(function()
{
$("input[value='stop']").hide();
$("div#view_firstPage").hide();
$("input[value='start']").click(function(){
$("div#view_splashPage").hide();
$("div#view_firstPage").show();
getNextExercise(0);//start first excercise
var times = 9;
$(document).everyTime(32500,"exerciseTimer",function(i) {
getNextExercise(i);
}, times);
$(this).hide();
$("input[value='stop']").show();
})
$("input[value='stop']").click(function(){
$("div#clock span").stopTime("secondHand");
$("div#view_splashPage").show();
$("div#view_firstPage").hide();
$("input[value='stop']").hide();
$("input[value='start']").show();
$("div.exercise").css("background-color","gray");
});
function getNextExercise(exNum){
var exerciseTitle = $("div.exercise").eq(exNum).text();
$("div.exercise").eq(exNum).css("background-color","blue");
$("h2.currentExcercise").text(exerciseTitle);
$("div#view_firstPage").show();
$("div#view_firstPage").animate({opacity:0.25},150,function(){
$("div#view_firstPage").animate({opacity:0.75},150,function(){
$("div#view_firstPage").animate({opacity:0.25},150,function(){
$("div#view_firstPage").animate({opacity:0.75},150,function(){
$("div#view_firstPage").animate({opacity:0.25},150,function(){
$("div#view_firstPage").animate({opacity:1},150,function(){
$("div#clock span").html("30").everyTime(1000,"secondHand",function(i) {
var counter = 30 - i;
if(i<=30) {
if(counter<10) {
var formattedText = "0"+counter
} else {var formattedText = ""+counter}
$(this).html(formattedText);
} else {
$("div#clock span").stopTime("secondHand");
$("div#view_firstPage").hide();
}
}, 31);
})
})
})
})
})
})
}
});
</script>
</head>
<body>
<div class="container">
<div class="row" id="header">
<div class="span10">
<h1>ab time.<h1>
</div>
<div class="span6" id="controls">
<input type="button" class="btn success" value="start">
<input type="button" class="btn danger" value="stop">
</div>
</div>
<div class="view" id="view_splashPage">
<div class="row">
<div class="span8 offset4">
<h2>Press start.</h2>
</div>
</div>
</div>
<div class="view" id="view_firstPage">
<div class="row">
<div class="span8 offset4">
<h2 class="currentExcercise"></h2>
</div>
</div>
<div class="row" id="clock">
<div class="span8 offset4">0:<span>30</span></div>
</div>
</div>
<div class="row" id="timeline">
<div class="span16">
<div class="exercise">Crunches, reach for your toes.</div>
<div class="exercise">Reverse crunches.</div>
<div class="exercise">Lawn chairs.</div>
<div class="exercise">Cross over reaches.</div>
<div class="exercise">Half lawn chairs.</div>
<div class="exercise">6-inch holds.</div>
<div class="exercise">Rope climb.</div>
<div class="exercise">Jack knives.</div>
<div class="exercise">Frogs, 3 seconds.</div>
<div class="exercise">Plank.</div>
</div>
</div>
</div>
</body>
</html>