-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
91 lines (78 loc) · 2.08 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
<style>
/*center title horizontally and vertically*/
.title {
text-align: center;
margin-top: 20px;
margin-bottom: 20px;
}
/*make title bold and bigger*/
.title {
font-weight: bold;
font-size: 30px;
}
/*Make cool buttons*/
.button {
border: none;
color: #DFD964;
padding: 15px 32px;
text-align: center;
text-decoration: none;
font-size: 70px;
margin: 4px 2px;
cursor: pointer;
}
.logo {
max-width: 90%;
width: 60%;
}
/*Set body background image to fit to screen*/
body {
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
video {
position: absolute;
top: 0;
left: 0;
z-index: -1;
height: 100%;
width: 100%;
object-fit: cover;
}
#menu {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 50%;
height: 50%;
}
</style>
<script>
function startIntro() {
document.getElementById("introvideo").play();
document.getElementById("menu").style.display = "none";
}
function skipIntro() {
location = "tutorial.html";
}
</script>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<center>
<div id="menu">
<img src="assets/logo.png" class="title logo center">
<br>
<button class="button center" onclick="startIntro()"><img src="assets/mainmenu/start.png"></button>
<button class="button center" onclick="skipIntro()"><img width="225" src="assets/mainmenu/skipintro.png"></button>
</div>
<video playsinline id="introvideo" src="assets/mainmenu/video.mp4"></video>
</center>
<script type='text/javascript'>
document.getElementById('introvideo').addEventListener('ended', myHandler, false);
function myHandler(e) {
window.location.href = 'tutorial.html'
}
</script>