forked from mluvii/customization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquest1-intro.html
120 lines (104 loc) · 2.73 KB
/
quest1-intro.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
<html>
<head>
<meta charset="UTF-8" />
<style type="text/css">
@font-face {
font-family: eightBit;
src: url(./eight-bit-dragon.otf);
}
#centerDiv{
text-align: center;
width: 400px;
height: 100%;
margin-left: auto;
margin-right: auto;
vertical-align: center;
}
#introVideo{
width: 100%;
position: fixed;
display: block;
left: 0;
right: 0;
display: none;
}
#introVideo.visible{
display: block;
}
#hint{
display: none;
margin-top: calc(50vh - 35px);
vertical-align: middle;
height: 100px;
}
#hint.visible{
display: block;
}
#startButton{
display: none;
background-color: #0f0;
border-radius: 10px;
width: 350px;
height: 70px;
padding: 10px;
margin: auto;
margin-top: calc(50vh - 35px);
color: #000;
font-weight: bold;
font-size: 20px;
cursor: pointer;
}
#startButton:hover{
background-color: #0f0;
}
#startButton.visible{
display: block;
}
body {
background-color: #000;
color: #0f0;
padding: 0;
position: fixed;
width: 100%;
height: 100%;
font-family: "eightBit", serif;
}
</style>
</head>
<body>
<div id="centerDiv">
<video controls id="introVideo">
<source src="https://mluvii.github.io/customization/1.%20otev%C5%99en%C3%AD%20konzole_saw.mp4" type="video/mp4" autoplay>
Your browser does not support the video tag.
</video>
<div id="startButton" class="visible">
<p>Nechť hra započne! Pusťte si video!</p>
</div>
<div id="hint">
<p>V konzoli otevřete náš chat, kde naleznete jak pokračovat dále. Poradíme vám, hledejte na objektu $owidget</p>
</div>
</div>
<script type="text/javascript">
(function () {
var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.async = true; scr.charset = 'UTF-8';
scr.src = '//app.mluvii.com/widget/OOWidget.js';
scr.$owidgetOnLoad = function (owidget) {
if (!owidget.isSupported) { return; }
owidget.init("295b1064-cf5b-4a5d-9e05-e7a74f86ae5e", "Nabor");
owidget.connectToServer();
};
var ffs = document.getElementsByTagName('script')[0]; ffs.parentNode.insertBefore(scr, ffs);
})();
document.getElementById('introVideo').addEventListener('ended',videoEndedHandler,false);
function videoEndedHandler(e) {
document.getElementById('introVideo').classList.remove("visible");
document.getElementById('hint').classList.add("visible");
}
document.getElementById('startButton').addEventListener('click',startClicked,false);
function startClicked(e) {
document.getElementById('introVideo').classList.add("visible");
document.getElementById('startButton').classList.remove("visible");
}
</script>
</body>
</html>