forked from avinash201199/stopwatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
143 lines (125 loc) · 6.38 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Stop Watch</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- External CSS File Link -->
<link rel="stylesheet" href="./style.css" />
<!-- External JS File Link -->
<script type="text/javascript" src="script.js"></script>
<!-- Favicon Icon-->
<link rel="apple-touch-icon" sizes="180x180" href="./stopwatch-main/clock.png">
<link rel="icon" type="image/png" sizes="32x32" href="./stopwatch-main/clock.png">
<!-- jquery CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<!-- FontAwesome CDN-->
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
<!-- Bootstrap CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a id="disabling" class="navbar-brand" href="#" style="font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif">
<img src="https://icons.iconarchive.com/icons/martz90/circle/256/timer-icon.png" style="height: 2rem; width: 2rem;" alt=""> <span id="title1">Stop Watch</span></a>
<button class="navbar-toggler" style="background-color: rgb(77, 123, 247);" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#"> </a>
</li>
<li class="nav-item">
<a class="nav-link" style="font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color:#72acac;" href="pomodoro/index.html">Pomodoro Timer</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#"></a>
</li>
</ul>
<input type="checkbox" id="light" class="checkbox">
<label for="checkbox" class="label">
<i class="fas fa-moon"></i>
<i class='fas fa-sun'></i>
<div class='ball'>
</label>
</div>
</nav>
<div class="container-fluid">
<div id="container">
<div>
<div id="time">
<span>
<span class="digit" id="hr">00</span>
<span class="txt">Hr</span>
</span>
<span>
<span class="digit" id="min">00</span>
<span class="txt">Min</span>
</span>
<span>
<span class="digit" id="sec">00</span>
<span class="txt">Sec</span>
</span>
<span>
<span class="digit" id="count">00</span>
<span class="txt">Ms</span>
</span>
</div>
<span class="todayDate">Day: <span id="d1"></span></span>
</div>
<hr />
<div id="btn-container">
<button class="buttons" id="start" onclick="start()"><i class="far fa-play-circle"></i> Start</button>
<!-- <button class="btn" id="stop" onclick="stop()">Stop</button> -->
<button class="buttons" id="reset" onclick="reset()"><i class="fas fa-power-off"></i> Reset</button>
<button class="buttons" id="lap" onclick="lap()"><i class="fas fa-stopwatch"></i> Lap</button>
<button class="buttons" id="clearlap" onclick="clearLap()"><i class="fad fa-trash-alt"></i></i> Clear Lap</button>
</div>
<div>
<div id="record-container">
<table id="record-table">
<tr>
<th>Lap Number</th>
<th>Time</th>
</tr>
<tbody id="record-table-body">
</tbody>
</table>
</div>
</div>
<hr />
</div>
</div>
<script type="text/javascript">
// start or stop stopwatch using "spacebar" key
document.addEventListener('keyup', event => {
if (event.code === 'Space') {
start();
}
})
document.addEventListener('keyup', event => {
if (event.code === 'Backspace') {
reset();
}
})
document.addEventListener('keyup', event => {
if (event.code === 'Enter') {
lap();
}
})
document.addEventListener('keyup', event => {
if (event.code === 'Numpad0') {
clearLap();
}
})
</script>
<script src="script.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>