-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
135 lines (127 loc) · 6.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Quattrocento+Sans" rel="stylesheet">
<link rel="stylesheet" href="styling.css">
</head>
<body>
<div class="container-fluid">
<div class="text-center">
<header>
<h1>Typing Test</h1>
</header>
<!-- using bootstrap "row" and col-xs; xs means extra small elements-->
<div class="row">
<div class="col-3 measurement">
<div class="meas_container">
<div class="typingIcon">
<img src="images/speed2.png" width="60">
</div>
<div id="wpm" class="value">0
</div>
<div class="title"><span>WPM</span>
</div>
</div>
<div class="change">
<span id="wpmChange"></span>
</div>
</div>
<div class="col-3 measurement">
<div class="meas_container">
<div class="typingIcon">
<img src="images/cpm.png" width="30">
</div>
<div id="cpm" class="value">0
</div>
<div class="title"><span>CPM</span>
</div>
</div>
<div class="change">
<span id="cpmChange"></span>
</div>
</div>
<div class="col-3 measurement">
<div class="meas_container">
<div class="typingIcon">
<img src="images/accuracy.png" width="50">
</div>
<div id="accuracy" class="value">0%
</div>
<div class="title"><span>Accuracy</span>
</div>
</div>
<div class="change">
<span id="accuracyChange"></span>
</div>
</div>
<div class="col-3 measurement">
<div class="meas_container">
<div class="typingIcon">
<img src="images/stopwatch.png" width="45">
</div>
<div id="timeLeft" class="value">5
</div>
<div class="title"><span>Time Left</span>
</div>
</div>
</div>
</div>
<!-- test words-->
<div id="content" class="text-center"></div>
<!-- text input-->
<div>
<input type="text" placeholder="type here" class="text-center" id="input">
</div>
<!-- keyboard-->
<div class="keyboard"></div>
<!-- restart-->
<div class="restart">
<!-- the classes in the button are predefined in bootstrap
the onClick is a predefined function that reload the page-->
<button type="button" class="btn btn-primary btn-lg" onclick="location.reload()">Restart</button>
</div>
<!-- modal used using bootstrap-->
<div class="modal" id="myModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">You finished your test!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<!-- form-group is used with bootstrap to group the form data-->
<div class="form-group">
<label for="name" class="sr-only">Enter your name: </label>
<input type="text" class="form-control" id="name" placeholder="Your full name">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-info" id="download">Download your certificate</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<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.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.debug.js"></script>
<script type="text/javascript" src="dataModule.js"></script>
<script type="text/javascript" src="UIModule.js"></script>
<script type="text/javascript" src="certificateModule.js"></script>
<script type="text/javascript" src="wordsModule.js"></script>
<script type="text/javascript" src="eventsModule.js"></script>
<script type="text/javascript" src="code.js"></script>
</body>
</html>