-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
279 lines (258 loc) · 12.2 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
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Epic Unblocked Games</title>
<!-- Link to the favicon -->
<link rel="icon" href="https://static.wikia.nocookie.net/find-the-epic-faces-official/images/e/e6/Site-logo.png/revision/latest?cb=20231018200622" type="image/x-icon">
<!-- Link to Google Fonts for rounded font -->
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0;
background-color: #000000; /* Fondo negro */
text-align: center;
color: white; /* Color del texto */
position: relative; /* Para permitir posicionar elementos dentro */
font-family: 'Quicksand', sans-serif; /* Usar fuente redondeada */
}
.game {
text-align: center;
margin: 20px;
display: inline-block; /* Cambiado para mostrar los juegos en línea */
}
a {
text-decoration: none;
color: #007BFF;
}
a:hover {
text-decoration: underline;
}
.game-container {
display: flex; /* Cambiado a flex para mostrar en línea */
flex-wrap: wrap; /* Permitir el ajuste de elementos */
justify-content: center; /* Centrar los juegos */
}
#searchBar {
margin: 20px;
padding: 10px;
width: 300px;
background-color: #333; /* Color del fondo de la barra de búsqueda */
border: none;
color: white; /* Color del texto de la barra de búsqueda */
font-family: 'Quicksand', sans-serif; /* Usar fuente redondeada */
}
#searchBar::placeholder {
color: #aaa; /* Color del placeholder */
}
.description {
font-size: 14px;
color: #ccc; /* Color del texto de la descripción */
display: none; /* Oculto por defecto */
}
/* Styles for the iframe */
#gameFrame {
width: 800px; /* Ajustar ancho según sea necesario */
height: 600px; /* Ajustar altura según sea necesario */
border: 1px solid #ccc;
display: none; /* Oculto por defecto */
}
#fullscreenButton {
margin: 20px;
padding: 10px 20px;
font-size: 16px;
background-color: #007BFF; /* Color del botón de pantalla completa */
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-family: 'Quicksand', sans-serif; /* Usar fuente redondeada */
display: none; /* Oculto por defecto */
width: 150px; /* Ancho uniforme */
height: 40px; /* Altura uniforme */
}
#fullscreenButton:hover {
background-color: #0056b3; /* Color de hover del botón */
}
#backButton {
margin: 20px;
padding: 10px 20px;
font-size: 16px;
background-color: #FF5733; /* Color del botón de volver */
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
display: none; /* Oculto por defecto */
font-family: 'Quicksand', sans-serif; /* Usar fuente redondeada */
width: 200px; /* Ancho aumentado */
height: 40px; /* Altura uniforme */
position: relative; /* Para ajustar la posición */
left: -20px; /* Mover hacia la izquierda */
}
#backButton:hover {
background-color: #C74A2A; /* Color de hover del botón de volver */
}
.hidden {
display: none; /* Clase para ocultar elementos */
}
.header {
position: absolute; /* Para posicionar en la parte superior izquierda */
top: 10px;
left: 10px; /* Cambiado a 'left' */
text-align: left; /* Alinear a la izquierda */
}
.category-filter {
position: absolute; /* Para posicionar en la parte superior derecha */
top: 10px; /* Espaciado desde la parte superior */
right: 10px; /* Espaciado desde la derecha */
text-align: right; /* Alinear a la derecha */
}
.controls {
display: none; /* Oculto por defecto */
text-align: center; /* Centrar el texto */
margin-top: 20px; /* Espaciado superior para separación */
}
</style>
</head>
<body>
<div class="header">
<h1>The Epic Unblocked Games</h1>
</div>
<!-- Category Filter -->
<div class="category-filter" id="categoryFilterContainer">
<label for="categoryFilter">Select Category:</label>
<select id="categoryFilter" onchange="filterGames()">
<option value="">All Categories</option>
<option value="sports">Sports</option>
<option value="2 players">2 Players</option>
<option value="2,3,4 players">2,3,4 Players</option>
<option value="racing">Racing</option>
<option value="action">Action</option>
<option value="1 player">1 Player</option>
<option value="hard games">Hard Games</option>
<!-- Agregar más categorías aquí -->
</select>
</div>
<!-- Search Bar -->
<input type="text" id="searchBar" placeholder="Search for a game..." onkeyup="filterGames()">
<div class="game-container" id="gameList">
<!-- Tube Jumpers -->
<div class="game" data-categories="2 players 2,3,4 players racing">
<a href="#" onclick="loadGame('games/tubejumpers/index.html')">
<img src="games/tubejumpers/img/icon.jpg" alt="Tube Jumpers" width="150">
<p class="game-name">Tube Jumpers</p>
<p class="description">An offline game for 2 to 4 players where you compete on floating tubes, trying to stay on while avoiding obstacles. Perfect for quick and fun local matches with friends!</p>
</a>
</div>
<!-- Basket Random -->
<div class="game" data-categories="sports 2 players">
<a href="#" onclick="loadGame('games/basketrandom/index.html')">
<img src="games/basketrandom/splash.jpeg" alt="Basket Random" width="150">
<p class="game-name">Basket Random</p>
<p class="description">A fun and chaotic basketball game where you control characters to shoot hoops. Perfect for casual play with friends!</p>
</a>
</div>
<!-- Boxing Random -->
<div class="game" data-categories="sports 2 players">
<a href="#" onclick="loadGame('games/boxingrandom/index.html')">
<img src="games/boxingrandom/512x512.jpg" alt="Boxing Random" width="150">
<p class="game-name">Boxing Random</p>
<p class="description">A hilarious and unpredictable boxing game. Punch your way to victory in this physics-based 2-player brawl!</p>
</a>
</div>
<!-- Volley Random -->
<div class="game" data-categories="sports 2 players">
<a href="#" onclick="loadGame('games/volleyrandom/index.html')">
<img src="games/volleyrandom/splash.png" alt="Volley Random" width="150">
<p class="game-name">Volley Random</p>
<p class="description">A crazy 2-player volleyball game with random physics. Smash the ball with friends in unpredictable matches!</p>
</a>
</div>
<!-- World's Hardest Game -->
<div class="game" data-categories="1 player hard games">
<a href="#" onclick="loadGame('games/worldshardestgame/index.html')">
<img src="games/worldshardestgame/images/splash.jpg" alt="World's Hardest Game" width="150">
<p class="game-name">World's Hardest Game</p>
<p class="description">A challenging game where you navigate through mazes while avoiding obstacles. Not for the faint of heart!</p>
</a>
</div>
<!-- World's Hardest Game 2 -->
<div class="game" data-categories="1 player hard games">
<a href="#" onclick="loadGame('games/worldshardestgame2/index.html')">
<img src="games/worldshardestgame2/the-worlds-hardest-game-2.jpg" alt="World's Hardest Game 2" width="150">
<p class="game-name">World's Hardest Game 2</p>
<p class="description">The sequel to the hardest game ever. More levels, more challenges, and even harder than before!</p>
</a>
</div>
<!-- More games... -->
</div>
<iframe id="gameFrame"></iframe>
<div class="controls">
<button id="fullscreenButton" onclick="goFullscreen()">Fullscreen Mode</button>
<button id="backButton" onclick="closeGame()">Back to Game List</button>
</div>
<script>
// Function to load the selected game into the iframe
function loadGame(url) {
document.getElementById('gameFrame').src = url;
document.getElementById('gameFrame').style.display = 'block';
document.querySelector('.controls').style.display = 'block';
document.getElementById('gameList').classList.add('hidden');
document.getElementById('searchBar').style.display = 'none';
document.getElementById('categoryFilterContainer').style.display = 'none';
}
// Function to go fullscreen
function goFullscreen() {
const iframe = document.getElementById('gameFrame');
if (iframe.requestFullscreen) {
iframe.requestFullscreen();
} else if (iframe.mozRequestFullScreen) {
iframe.mozRequestFullScreen(); // Firefox
} else if (iframe.webkitRequestFullscreen) {
iframe.webkitRequestFullscreen(); // Chrome, Safari and Opera
} else if (iframe.msRequestFullscreen) {
iframe.msRequestFullscreen(); // IE/Edge
}
}
// Function to close the game and return to the game list
function closeGame() {
document.getElementById('gameFrame').src = '';
document.getElementById('gameFrame').style.display = 'none';
document.querySelector('.controls').style.display = 'none';
document.getElementById('gameList').classList.remove('hidden');
document.getElementById('searchBar').style.display = 'block';
document.getElementById('categoryFilterContainer').style.display = 'block';
}
// Function to filter games by search and category
function filterGames() {
const searchValue = document.getElementById('searchBar').value.toLowerCase();
const categoryValue = document.getElementById('categoryFilter').value;
const games = document.querySelectorAll('.game');
games.forEach(game => {
const gameName = game.querySelector('.game-name').textContent.toLowerCase();
const description = game.querySelector('.description').textContent.toLowerCase();
const categories = game.getAttribute('data-categories');
const matchesSearch = gameName.includes(searchValue) || description.includes(searchValue);
const matchesCategory = categoryValue === '' || categories.includes(categoryValue);
if (matchesSearch && matchesCategory) {
game.style.display = 'inline-block';
// Show description only if search or category filter is active
if (searchValue || categoryValue) {
game.querySelector('.description').style.display = 'block';
} else {
game.querySelector('.description').style.display = 'none';
}
} else {
game.style.display = 'none';
}
});
}
</script>
</body>
</html>