Skip to content

Commit c22ce32

Browse files
committed
new: fullscreen mode when 'F' key is pressed. karbassi#8
Closes karbassi#8.
1 parent 6e6eacd commit c22ce32

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

assets/css/style.css

+11-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ body {
88
body {
99
display: flex;
1010

11+
margin: 0;
12+
1113
-webkit-user-select: none;
1214
-moz-user-select: none;
1315
-ms-user-select: none;
@@ -24,7 +26,7 @@ body {
2426

2527
#bgfill {
2628
position: absolute;
27-
z-index: -1;
29+
z-index: 1;
2830
bottom: 0;
2931
left: 0;
3032

@@ -35,26 +37,34 @@ body {
3537
}
3638

3739
#timer {
40+
z-index: 2;
41+
3842
display: none;
3943
flex-direction: row;
4044

4145
font-size: 10vw;
4246
}
4347

4448
#time {
49+
z-index: 2;
50+
4551
display: none;
4652
flex-direction: row;
4753

4854
font-size: 10vw;
4955
}
5056

5157
#tutorial {
58+
z-index: 2;
59+
5260
display: flex;
5361

5462
font-size: 9vmin;
5563
}
5664

5765
#done {
66+
z-index: 2;
67+
5868
display: none;
5969

6070
font-size: 10vmin;

assets/js/screenfull.min.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/timer.js

+7
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@ function onKeyPressed(event) {
365365
}
366366

367367
// 46 = DELETE
368+
369+
// 70 = F
370+
if (event.keyCode === 70) {
371+
if (screenfull.enabled) {
372+
screenfull.toggle();
373+
}
374+
}
368375
}
369376

370377
window.addEventListener('keydown', onKeyPressed);

index.html

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<source src="assets/audio/beep.mp3" type="audio/mp3">
2929
</audio>
3030

31+
<script src="assets/js/screenfull.min.js"></script>
3132
<script src="assets/js/timer.js"></script>
3233
</body>
3334
</html>

0 commit comments

Comments
 (0)