-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathindex.html
188 lines (175 loc) · 6.58 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
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
<!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 -->
<!-- Favicon Icon-->
<link rel="icon" type="image/png" href="./img/favicon.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" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-expand-lg bg-white thinner navcol">
<div class="container-fluid">
<div class="maintitle">
<img src="./img/logo.gif"
style="height: 3rem; width: 3rem;margin-right:1rem; font-weight:bold" alt=""> <span id="title1">Stop Watch</span>
</div>
<button class="navbar-toggler" style="background-color: rgb(77, 123, 247);" type="button"
data-bs-toggle="collapse" data-bs-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 px-4">
<a class="nav-link btn secondary" id="link--active"
style="font-family:'Lucida Sans', font-weight:bold, 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color:#003333;"
href="#">
STOP WATCH
</a>
<a class="nav-link btn secondary"
style="font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color:#003333;"
href="pomodoro/index.html">
POMODORO TIMER
</a>
<a class="nav-link btn secondary"
style="font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color:#003333;"
href="custom_timer/timer.html">
CUSTOM TIMER
</a>
</li>
</ul>
<div id="switch-theme">
<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'>
</ball>
</div>
</label>
</div>
</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">
<h3><span id="d1"></span></h3>
</span>
</div>
<hr />
<div id="btn-container">
<button class="buttons" id="start" onclick="start()">
<i class="fas 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-undo"></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="fas fa-trash"></i> Clear Lap
</button>
</div>
<div>
<div id="record-container">
<table id="record-table">
<tr>
<th>Lap Number</th>
<th>Time</th>
<th>Diff</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>
<!-- FOOTER -->
<footer>
<div class="container-fluid my-class foot">
<div class="container">
<p class="textfooter" style="margin-top: 2rem;">Made with 💝 by Avinash Singh</p>
<div>
<ul style="color: white" class="social-links">
<li class="hov">
<a href="https://github.com/avinash201199">
<img class="link" src="./img/GitHub.png" /></a>
</li>
<li class="hov">
<a href="https://www.linkedin.com/in/avinash-singh-071b79175/">
<img class="link" src="./img/LinkedinLogo.png" /></a>
</li>
<li class="hov">
<a href="https://www.instagram.com/lets__code/">
<img class="link" src="./img/Instagram.png" /></a>
</li>
</ul>
</div>
</div>
</div>
</container>
</footer>
</body>
</html>