-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchose_mode.html
200 lines (174 loc) · 5.23 KB
/
chose_mode.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Choose Mode</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
</head>
<style>
.bg {
background: url(assets/images/chunin-exam-background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;
width: 100%;
}
body,
html {
margin: 0;
padding: 0;
height: 100%;
}
h1,
h4 {
text-align: center;
}
.center {
text-align: center;
}
form {
align-content: center;
}
.row {
--bs-gutter-x: 0
}
.hovereffect {
width: 100%;
height: 400px;
float: left;
overflow: hidden;
position: relative;
text-align: center;
cursor: default;
margin-bottom: 10px;
}
.hovereffect .overlay {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
opacity: 0;
background-color: rgba(0, 0, 0, 0.5);
-webkit-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.hovereffect img {
width: 100%;
height: 400px;
display: block;
position: relative;
-webkit-transition: all .4s linear;
transition: all .4s linear;
}
.hovereffect h2 {
text-transform: uppercase;
color: #fff;
text-align: center;
position: relative;
font-size: 17px;
background: rgba(0, 0, 0, 0.6);
-webkit-transform: translatey(-100px);
-ms-transform: translatey(-100px);
transform: translatey(-100px);
-webkit-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
padding: 10px;
}
.hovereffect h5 {
color: #fff;
text-align: center;
padding: 10px;
}
.hovereffect a.info {
text-decoration: none;
display: inline-block;
text-transform: uppercase;
color: #fff;
border: 1px solid #fff;
background-color: transparent;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
margin: 50px 0 0;
padding: 7px 14px;
}
.hovereffect a.info:hover {
box-shadow: 0 0 5px #fff;
}
.hovereffect:hover img {
-ms-transform: scale(1.2);
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
.hovereffect:hover .overlay {
opacity: 1;
filter: alpha(opacity=100);
}
.hovereffect:hover h2,
.hovereffect:hover a.info {
opacity: 1;
filter: alpha(opacity=100);
-ms-transform: translatey(0);
-webkit-transform: translatey(0);
transform: translatey(0);
}
.hovereffect:hover a.info {
-webkit-transition-delay: .2s;
transition-delay: .2s;
}
</style>
<body>
<div class="bg">
<div class="p-5 text-center">
<h1 class="mb-3">Choose Mode</h1>
<h4 class="mb-3">Select Anyone of the modes below</h4>
</div>
<div class="row">
<div class="col-6">
<div class="hovereffect">
<img class="img-responsive" src="assets/images/single-player.png" alt="">
<div class="overlay">
<h2>Single Player</h2>
<h5>Player with computer</h5>
<a class="info" onclick="startSinglePlayer()">Start Game</a>
</div>
</div>
</div>
<div class="col-6">
<div class="hovereffect">
<img class="img-responsive" src="assets/images/multiplayer.png" alt="">
<div class="overlay">
<h2>Multiplayer</h2>
<h5>Play with friend</h5>
<!-- <h5>Coming soon</h5> -->
<a class="info" onclick="startMultiPlayer()">Start Game</a>
<!-- <a class="info" href="#">Start Game</a> -->
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js"></script>
<script>
const startSinglePlayer = () => {
const urlParams = new URLSearchParams(window.location.search);
const character = urlParams.get('character');
let url = "single_player.html?character=" + character;
window.location.replace(url);
}
const startMultiPlayer = () => {
const urlParams = new URLSearchParams(window.location.search);
const character = urlParams.get('character');
let url = "multiplayer.html?character=" + character;
window.location.replace(url);
}
</script>