-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
395 lines (371 loc) · 13.3 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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!DOCTYPE html>
<html>
<head>
<title>Sigma Games</title>
<link rel="icon" href="img/favicon.png">
<style>
body {
margin: 0;
background-color: #121212;
color: #39FF14;
font-family: 'Roboto', Arial, sans-serif;
}
header {
background-color: #1e1e1e;
padding: 20px;
text-align: center;
color: #39FF14;
border-bottom: 2px solid #39FF14;
}
.search-container {
position: relative;
width: 500px;
margin: 10px auto;
}
.search-bar {
width: 100%;
padding: 10px;
border: 2px solid #39FF14;
border-radius: 4px;
background-color: #1e1e1e;
color: #39FF14;
}
.search-bar:focus {
outline: none;
border: 2px solid #55ff33;
}
.results-container {
position: absolute;
top: 100%;
left: 0;
width: 100%;
background: #ffffff;
color: #000;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
display: none;
z-index: 10;
max-height: 200px;
overflow-y: auto;
}
.result-item {
padding: 10px;
cursor: pointer;
border-bottom: 1px solid #ccc;
}
.result-item:hover {
background-color: #e0e0e0;
}
.main-content {
padding: 20px;
text-align: center;
}
.greeting-message {
margin-bottom: 20px;
font-size: 24px;
color: #55ff33;
}
.game-cards {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
}
.game-card {
background-color: #1e1e1e;
border: 2px solid #39FF14;
border-radius: 8px;
width: 300px;
padding: 15px;
color: #39FF14;
text-align: center;
transition: transform 0.3s;
position: relative; /* For positioning the plus sign */
min-height: 200px; /* Set a minimum height for the card */
}
.game-card:hover {
transform: translateY(-5px);
border-color: #55ff33;
}
.game-card img {
width: 100%;
height: 150px;
object-fit: cover;
border-radius: 6px;
}
.game-card h3 {
margin: 10px 0;
font-size: 20px;
}
.game-card p {
margin: 5px 0;
font-size: 14px;
}
.game-card a {
text-decoration: none;
color: #55ff33;
font-weight: bold;
}
.plus-sign {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 40px;
color: #39FF14;
cursor: pointer;
}
footer {
background-color: #1e1e1e;
color: #39FF14;
padding: 10px;
text-align: center;
border-top: 2px solid #39FF14;
margin-top: 20px;
}
.change-log-link {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #454545;
color: #39FF14;
padding: 10px;
border-radius: 5px;
text-decoration: none;
font-size: 14px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.change-log-link:hover {
background-color: #55ff33;
color: #000;
}
.feedback-container {
position: fixed;
bottom: 20px;
left: 20px; /* Change this from right to left */
background-color: #1e1e1e;
border: 2px solid #39FF14;
border-radius: 5px;
padding: 10px;
color: #39FF14;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.feedback-button {
background-color: #454545;
color: #39FF14;
border: none;
border-radius: 5px;
padding: 10px;
margin: 5px;
cursor: pointer;
font-size: 16px;
float: left;
}
.feedback-button:hover {
background-color: #55ff33;
color: #000;
}
.feedback-count {
margin-top: 10px;
font-size: 14px;
}
</style>
</head>
<body>
<header>
<h1>Sigma Games</h1>
<div class="search-container">
<input type="text" class="search-bar" id="searchBar" placeholder=" Search our free games and services..." oninput="handleSearch()">
<div class="results-container" id="resultsContainer"></div>
</div>
</header>
<div class="main-content">
<div id="a" class="greeting-message"></div>
<p>Here at Sigma Games we are dedicated to providing you with the latest games, search browsers and other free services.</p>
<p>This site will always be no-cost and ad-free so the games are free to use without random ad breaks.</p>
<br>
<p>Is a game blocked?</p>
<a href="sigma games.zip" download> download here</a>
<br>
<h2>Popular Unblocked Games</h2>
<div class="game-cards">
<div class="game-card" onclick="retroBowl()">
<img src="img/rb.png" alt="Retro Bowl">
<h3>Retro Bowl</h3>
<p>Retro Bowl is an American football video game developed by New Star Games for iOS, Android, and unblocked online.</p>
<a href="retro-bowl" target="_blank">Play Now</a>
<div class="plus-sign" onclick="bookmarkGame('Retro Bowl', '/retro-bowl', event)">+</div>
</div>
<div class="game-card" onclick="subwaySurfers()">
<img src="img/ss.jpeg" alt="Subway Surfers">
<h3>Subway Surfers</h3>
<p>Subway Surfers is a 2012 endless runner mobile game co-developed by Kiloo and SYBO Games, private companies based in Denmark.</p>
<a href="subway-surfers" target="_blank">Play Now</a>
<div class="plus-sign" onclick="bookmarkGame('Subway Surfers', '/subway-surfers', event)">+</div>
</div>
<div class="game-card" onclick="snowRider3D()">
<img src="img/sr3d.jpeg" alt="Snow Rider 3D">
<h3>Snow Rider 3D</h3>
<p>The world in Snow Rider is extremely lively, with unreal objects. You will control a sled through a series of hazards in dangerous snowy mountains.</p>
<a href="snow-rider-3d" target="_blank">Play Now</a>
<div class="plus-sign" onclick="bookmarkGame('Snow Rider 3D', '/snow-rider-3d', event)">+</div>
</div>
</div>
<br>
<h2>Your Bookmarked Games</h2>
<div class="game-cards" id="bookmarkedGames">
<div class="game-card" id="bookmark1">
<div class="plus-sign" onclick="searchGame(event)">+</div>
</div>
<div class="game-card" id="bookmark2">
<div class="plus-sign" onclick="searchGame(event)">+</div>
</div>
<div class="game-card" id="bookmark3">
<div class="plus-sign" onclick="searchGame(event)">+</div>
</div>
</div>
<br>
</div>
<!-- Feedback section -->
<div class="feedback-container">
<button id="likeButton" class="feedback-button">👍 Like</button>
<button id="dislikeButton" class="feedback-button">👎 Dislike</button>
<div id="feedbackCount" class="feedback-count">Likes: 0 | Dislikes: 0</div>
</div>
<a href="change-log.html" target="_blank" class="change-log-link">View Change Log</a> <!-- Change log link -->
<script src="data.js"></script>
<script>
function retroBowl() {
window.open('retro-bowl', '_blank');
}
function subwaySurfers() {
window.open('subway-surfers', '_blank');
}
function snowRider3D() {
window.open('snow-rider-3d', '_blank');
}
function bookmarkGame(name, url, event) {
event.stopPropagation(); // Prevent triggering the card click
const bookmarks = JSON.parse(localStorage.getItem('bookmarks')) || {};
if (!bookmarks[name]) {
bookmarks[name] = url;
localStorage.setItem('bookmarks', JSON.stringify(bookmarks));
alert(`${name} has been bookmarked!`);
} else {
alert(`${name} is already bookmarked.`);
}
displayBookmarkedGames(); // Refresh the bookmarked games display
}
function displayBookmarkedGames() {
const bookmarkedGamesContainer = document.getElementById('bookmarkedGames');
const bookmarks = JSON.parse(localStorage.getItem('bookmarks')) || {};
// Clear existing bookmarks
bookmarkedGamesContainer.innerHTML = '';
// Create cards for each bookmarked game
let index = 1; // To track which bookmark card to fill
for (const [name, url] of Object.entries(bookmarks)) {
const card = document.createElement('div');
card.className = 'game-card';
card.innerHTML = `
<div onclick="window.open('${url}', '_blank')">
<h3>${name}</h3>
<p>Bookmark for ${name} game.</p>
<a href="${url}" target="_blank">Play Now</a>
<div class="plus-sign" onclick="removeBookmark('${name}', event)"><h4>-</h4></div>
</div>
`;
bookmarkedGamesContainer.appendChild(card);
index++;
}
while (index <= 3) {
const emptyCard = document.createElement('div');
emptyCard.className = 'game-card';
emptyCard.innerHTML = `<div class="plus-sign" onclick="searchGame(event)">+</div>`;
bookmarkedGamesContainer.appendChild(emptyCard);
index++;
}
}
function removeBookmark(name, event) {
event.stopPropagation(); // Prevent triggering the card click
const bookmarks = JSON.parse(localStorage.getItem('bookmarks')) || {};
delete bookmarks[name]; // Remove the bookmark
localStorage.setItem('bookmarks', JSON.stringify(bookmarks)); // Update localStorage
alert(`${name} has been removed from bookmarks.`);
displayBookmarkedGames(); // Refresh the bookmarked games display
}
function searchGame(event) {
const input = prompt("Enter the game name to bookmark:");
if (input) {
const game = data.find(item => item.name.toLowerCase() === input.toLowerCase());
if (game) {
bookmarkGame(game.name, game.url, event);
} else {
alert("Game not found. Please try again.");
}
}
}
function handleSearch() {
const input = document.getElementById('searchBar').value.toLowerCase();
const resultsContainer = document.getElementById('resultsContainer');
resultsContainer.innerHTML = '';
if (input.trim() === '') {
resultsContainer.style.display = 'none';
return;
}
const filteredResults = data.filter(item => item.query.toLowerCase().includes(input));
if (filteredResults.length > 0) {
resultsContainer.style.display = 'block';
filteredResults.forEach(item => {
const resultItem = document.createElement('div');
resultItem.textContent = item.name;
resultItem.classList.add('result-item');
resultItem.onclick = () => {
window.open(item.url, '_blank');
resultsContainer.style.display = 'none';
};
resultsContainer.appendChild(resultItem);
});
} else {
resultsContainer.style.display = 'none';
}
}
const place = document.getElementById("a");
let today = new Date();
let hourNow = today.getHours();
let greeting;
if (hourNow > 18) {
greeting = 'Good evening!';
} else if (hourNow > 12) {
greeting = 'Good afternoon!';
} else if (hourNow > 0) {
greeting = 'Good morning!';
} else {
greeting = 'Hello';
}
place.innerHTML = '<span>' + greeting + ' and welcome to Sigma Games!</span>';
// Display bookmarks on page load
displayBookmarkedGames();
// Feedback functionality
let likeCount = localStorage.getItem('likeCount') ? parseInt(localStorage.getItem('likeCount')) : 0;
let dislikeCount = localStorage.getItem('dislikeCount') ? parseInt(localStorage.getItem('dislikeCount')) : 0;
// Update the counts display on page load
updateFeedbackCount();
document.getElementById('likeButton').addEventListener('click', function() {
likeCount++;
localStorage.setItem('likeCount', likeCount); // Save to localStorage
updateFeedbackCount();
});
document.getElementById('dislikeButton').addEventListener('click', function() {
dislikeCount++;
localStorage.setItem('dislikeCount', dislikeCount); // Save to localStorage
updateFeedbackCount();
});
function updateFeedbackCount() {
document.getElementById('feedbackCount').textContent = `Likes: ${likeCount} | Dislikes: ${dislikeCount}`;
}
</script>
</body>
</html>