-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
125 lines (104 loc) · 3.99 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Countdown</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/*
This CSS resource incorporates links to font software which is the valuable copyrighted
property of Monotype and/or its suppliers. You may not attempt to copy, install,
redistribute, convert, modify or reverse engineer this font software. Please contact Monotype
with any questions regarding Web Fonts: http://www.linotype.com
*/
@font-face {
font-family: "FrutigerLTW04";
src: url("https://worldskills.org/application/themes/worldskills_org/fonts/1572255/3c1542d6-dbb8-4bb3-85e5-730bbf131fcc.eot?#iefix");
src: url("https://worldskills.org/application/themes/worldskills_org/fonts/1572255/3c1542d6-dbb8-4bb3-85e5-730bbf131fcc.eot?#iefix") format("eot"), url("https://worldskills.org/application/themes/worldskills_org/fonts/1572255/61381871-0847-435e-9498-63b7c3d9c071.woff2") format("woff2"), url("https://worldskills.org/application/themes/worldskills_org/fonts/1572255/b33c9c65-2311-4db9-a364-ae857e998b70.woff") format("woff"), url("https://worldskills.org/application/themes/worldskills_org/fonts/1572255/72290e69-f361-42ef-adc2-ed908eb88cb5.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Inria Serif";
src: url("https://worldskills.org/application/themes/worldskills_org/fonts/InriaSerif/InriaSerif-Bold.eot");
src: url("https://worldskills.org/application/themes/worldskills_org/fonts/InriaSerif/InriaSerif-Bold.eot?#iefix") format("embedded-opentype"),
url("https://worldskills.org/application/themes/worldskills_org/fonts/InriaSerif/InriaSerif-Bold.woff2") format("woff2"),
url("https://worldskills.org/application/themes/worldskills_org/fonts/InriaSerif/InriaSerif-Bold.woff") format("woff"),
url("https://worldskills.org/application/themes/worldskills_org/fonts/InriaSerif/InriaSerif-Bold.svg") format("svg");
font-weight: bold;
font-style: normal;
}
html {
background-color: #000;
}
body {
color: #fff;
font-family: "FrutigerLTW04", Frutiger, Arial, sans-serif;
font-size: 2vw;
user-select: none;
margin: 5vw;
}
#title {
font-family: "Inria Serif", serif;
font-weight: bold;
font-size: 6vw;
margin-top: 18vw;
margin-bottom: 4vw;
}
#time {
font-size: 10vw;
}
</style>
</head>
<body>
<div id="title"></div>
<div id="starts"></div>
<div id="time">00:00</div>
<script>
var i = 0;
var query = {};
query.time = '';
query.title = 'WorldSkills';
query.starts = 'starts in';
query.soon = 'starts soon';
var search = window.location.search.substring(1);
var vars = search.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
var key = decodeURIComponent(pair[0]);
var value = decodeURIComponent(pair[1]);
query[key] = value;
}
document.getElementById('title').innerText = query.title;
document.getElementById('starts').innerText = query.starts;
setInterval(function () {
if (query.time) {
i = Date.parse(query.time) - Date.now();
i = Math.floor(i / 1000);
} else {
i += 1;
}
if (i > 0) {
var hours = Math.floor(i / 3600);
var minutes = '0' + Math.floor(i % 3600 / 60);
var seconds = '0' + (i % 60);
var text = '';
if (hours > 0) {
text += hours;
text += ':';
}
text += minutes.substr(-2);
text += ':';
text += seconds.substr(-2);
document.getElementById('time').innerText = text;
} else {
document.getElementById('starts').innerText = query.soon;
document.getElementById('time').innerText = '';
}
}, 1000);
document.addEventListener('dblclick', function () {
document.documentElement.webkitRequestFullScreen();
});
</script>
</body>
</html>