-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprojectorClock.html
More file actions
231 lines (196 loc) · 5.84 KB
/
projectorClock.html
File metadata and controls
231 lines (196 loc) · 5.84 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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Projector clock</title>
<style>
#clockValue {
font-size: 90pt;
}
.hide {
display: none !important;
}
.lightcard {
color: black !important;
background-color: #ddd !important;
}
.darkcard {
color: #eee !important;
background-color: #333 !important;
}
</style>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
"use strict";
//debugger;
let clockUpdateLoop;
let isShowSeconds;
// Source: https://stackoverflow.com/questions/2998784/how-to-output-numbers-with-leading-zeros-in-javascript
function pad(num, size) {
var s = num + "";
while (s.length < size) s = "0" + s;
return s;
}
function updateClock() {
let d = new Date();
let timeString = pad(d.getHours(), 2) + ":"
+ pad(d.getMinutes(), 2);
if (isShowSeconds) {
timeString += ":" + pad(d.getSeconds(), 2);
}
$("#clockValue")[0].innerText = timeString;
}
function setClockFontsize(points) {
$("#clockValue")[0].style.fontSize = `${points}pt`;
}
function startClock() {
stopClock();
clockUpdateLoop = setInterval(updateClock, 200);
}
function stopClock() {
if (clockUpdateLoop != null) {
clearInterval(clockUpdateLoop);
clockUpdateLoop = null;
}
}
function showSeconds() {
isShowSeconds = true;
}
function hideSeconds() {
isShowSeconds = false;
}
function showNotes(style) {
switch (style) {
case "light": {
$("#notesCard")[0].classList.add("lightcard");
$("#notesCard")[0].classList.remove("darkcard");
break;
}
case "dark": {
$("#notesCard")[0].classList.add("darkcard");
$("#notesCard")[0].classList.remove("lightcard");
break;
}
default: {
}
}
$("#notesComponent")[0].classList.remove("hide");
}
function hideNotes() {
$("#notesComponent")[0].classList.add("hide");
}
function showVoorbladNotes(style) {
switch (style) {
case "light": {
$("#voorbladNotesCard")[0].classList.add("lightcard");
$("#voorbladNotesCard")[0].classList.remove("darkcard");
break;
}
case "dark": {
$("#voorbladNotesCard")[0].classList.add("darkcard");
$("#voorbladNotesCard")[0].classList.remove("lightcard");
break;
}
default: {
}
}
$("#voorbladNotesComponent")[0].classList.remove("hide");
}
function hideVoorbladNotes() {
$("#voorbladNotesComponent")[0].classList.add("hide");
}
function getNotes() {
return $("#notes")[0].innerHTML;
}
function setNotes(value) {
$("#notes")[0].innerHTML = value;
}
$(document).ready(function () {
clockUpdateLoop = null;
isShowSeconds = false;
startClock();
hideVoorbladNotes();
});
</script>
</head>
<body style="background-color:black;color:#eee;font-size:20px;">
<div style="position:absolute;left:0px;right:0px;top:0px;min-height:100vh;
display:flex;flex-flow:row nowrap;justify-content:center;">
<div style="display:flex;flex-flow:column nowrap; justify-content:center;">
<div id="clockComponent" style="display:flex;flex-flow:row nowrap;justify-content:center;flex:0 1 auto;
margin-bottom:10px;">
<div style="display:block;flex:0 1 auto;" id="clockValue"></div>
</div>
<div id="voorbladNotesComponent"
style="display:flex;flex-flow:row nowrap;justify-content:center;flex:0 1 auto;margin-top:10px;">
<div style="display:block;flex:0 1 auto;max-width:60vw;" class="card lightcard" id="voorbladNotesCard">
<div class="card-body" id="voorbladNotes" style="font-size: 16px;">
<ol>
<li>
Schrijf je naam en studentnummer op elk oplossingsblad. <strong>Begin elke opgave op een
nieuw blad.</strong> Bij het inleveren moet je elke opgave op een aparte stapel
leggen.
</li>
<li>
Schrijf duidelijk en leesbaar, zonder gekrabbel. Onleesbaar handschrift kan niet
nagekeken worden. Structureer je antwoord goed en leg je redenering goed uit.
</li>
<li>
Er zijn drie opgaven. Het resultaat telt voor 30% van het eindcijfer.
</li>
<li>
Het gebruik van elektronische hulpmiddelen (behalve een rekenmachine) is niet
toegestaan.
</li>
</ol>
</div>
</div>
</div>
<div id="notesComponent" style="display:flex;flex-flow:row nowrap;justify-content:center;flex:0 1 auto;
margin-top:10px;">
<div style="display:block;flex:0 1 auto;max-width:50vw;" class="card darkcard" id="notesCard">
<div class="card-body" id="notes">
<!--Nogmaals:
<ul>
<li>
Tijd tot <strong>19:30</strong> (voor extra tijd: tot 20:00).
</li>
<li>
Elke opgave op een nieuw tentamenblad.
</li>
<li>
Geen apparaten behalve rekenmachine.
</li>
<li>
In de laatste 30 minuten blijft iedereen zitten.
</li>
<li>
Zet je telefoon op stil, en stop het in je rugzak.
</li>
<li>
Maak je tafel en stoel schoon nadat je klaar bent met het deeltentamen.
</li>
<li>
Je mag dictaat, aantekeningen, en elk ander papieren materiaal gebruiken, maar je kan
alles doen zonder.
</li>
<li>
Als je recht hebt op extra tijd, schrijf dan 'extra tijd' op je tentamenblad.
</li>
</ul>
Veel succes!
-->
Tot 19:30 (+30 min voor extra tijd)
</div>
</div>
</div>
</div>
</body>
</html>