-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtimer.html
More file actions
executable file
·80 lines (76 loc) · 2.78 KB
/
timer.html
File metadata and controls
executable file
·80 lines (76 loc) · 2.78 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
<html>
<head>
<meta charset="UTF-8">
<style>
.KeepTalking { background-color:green; }
.OneMinuteLeft { background-color:yellow; }
.TimeOut{ background-color:red; }
.Timer { font-weight: bold; text-align: center;}
.Warning {color: red; }
#controls { position:absolute; bottom:0; z-index:50;}
#PageContainer {position:absolute ; top: 0; right: 0; bottom: 0; left: 0; z-index:5;}
#buttonHoverOverlay {position: fixed;
/*margin-top: -180px;*/ /* negative value of footer height */
height:70%;
width:100%;
z-index:999;
/* bottom:0px;*/
}
.timerButton {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #dcdcdc;
display:inline-block;
color:#777777;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:6px 24px;
text-decoration:none;
text-shadow:1px 1px 0px #ffffff;
}.timerButton:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}.timerButton:active {
position:relative;
top:1px;
}
</style>
</head>
<body>
<div id="PageContainer">
<div id="countdownDisplay" class="Timer"></div>
<div id = "controls">
<input type="button" id="startTimer" class="timerButton" value="Start" />
<input type="button" id="stopTimer" class="timerButton" value="Pause" />
<input type="button" id="resetTimer" class="timerButton" value="Reset" />
<input type="text" id="totalTime" placeholder="Number of minutes" />
</div>
</div>
<div id = "buttonHoverOverlay"></div>
<script type="text/javascript" src="./lib/jquery-1.7.2.js"></script>
<script type="text/javascript" src="./src/timer.js"></script>
<script type="text/javascript">
(function($) {
$("#PageContainer").addClass("KeepTalking");
var defaultMinutes = 5;
var timer = new Timer(defaultMinutes);
$('#startTimer').click(function () { timer.startTimer(); });
$('#stopTimer').click(function () { timer.pauseTimer(); });
$('#resetTimer').click(function () { timer.resetTimer(); });
timer.resetTimer();
})(jQuery);
</script>
</div>
</body>
</html>