-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
117 lines (101 loc) · 4.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Stopwatch</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="index.css">
<script src="https://kit.fontawesome.com/95e41cfd78.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="stopWatch.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
</head>
<body style=" background-image: url(./img/cubebg1.jpg);background-repeat: no-repeat;background-size: cover;";>
<div class="container">
<div id="sidenav-l" style="text-align: center;"><br>
<i style="margin-left: 70%;margin-top:-10px;cursor: pointer;" class="fas fa-times fa-2x" onclick="closelNav()"></i><br>
<i style="margin: auto;" class="fas fa-stopwatch fa-4x"></i><br>
<p style="font-family:Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;margin-top: 5px;">Solve Times</p>
<div id="sidenav"></div>
</div>
<div class="stickers">
<div>
<button class="solveside" onclick="openlNav()" style="cursor: pointer;">Solves</button>
</div>
<div class="userside" onclick="openrNav()" style="cursor: pointer;" >User</div>
</div>
<div class="disbut" style="text-align: center;">
<i style="margin: auto;margin-top: 20px;" class="fas fa-cubes fa-3x"></i><br>
<div id="display">
00:00:00
</div>
<div class="buttons">
<button id ="save" onclick="save()" class="btn btn-success btn-lg" style="margin-right:10px ;">Save</button>
<button id ="rst" onclick="reset()" class="btn btn-danger btn-lg" style="margin-left:10px ;">Reset</button>
</div>
</div>
</div>
<div id="sidenav-r" style="text-align: center;"><br>
<i style="margin-right: 70%;margin-top:-10px;cursor: pointer;" class="fas fa-times fa-2x" onclick="closerNav()"></i><br>
<i style="margin: auto;" class="fas fa-user fa-4x"></i><br>
<p style="font-family:Verdana, Geneva, Tahoma, sans-serif;font-weight: 600;margin-top: 5px;">Feliks Zemdegs</p>
</div>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
var c=0;
$(document).ready(function() {
$(document).keydown(function(e){
if(e.keyCode=='32'){
document.getElementById("display").style.color="red";
}
});
$(document).keyup(function(e) {
if (e.keyCode == '32') {
document.getElementById("display").style.color="green";
if (c==0){
c++;
start();
}
else{
c=0;
display();
save();
}
}
});
});
</script>
<script>
var c1=0,c2=0;
function openlNav() {
if(c1%2==0){
document.getElementById("sidenav-l").style.width = "200px";
c1++;
}
else if(c1%2!=0){
document.getElementById("sidenav-l").style.width = "0";
c1++;
}
}
function closelNav() {
c1++;
document.getElementById("sidenav-l").style.width = "0";
}
function openrNav() {
if(c2%2==0){
document.getElementById("sidenav-r").style.width = "200px";
c2++;
}
else if(c2%2!=0){
document.getElementById("sidenav-r").style.width = "0";
c2++;
}
}
function closerNav() {
c2++;
document.getElementById("sidenav-r").style.width = "0";
}
</script>
</body>
</html>