Skip to content

Commit 3babb4c

Browse files
authored
Update game17.html
1 parent d5ee997 commit 3babb4c

File tree

1 file changed

+141
-3
lines changed

1 file changed

+141
-3
lines changed

games/game17.html

Lines changed: 141 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<link rel="icon" href="https://nexustore.github.io/assets/NexuStoreByTermos.png" type="image/png">
7-
<title>NexuStore - Play Incredibox Online</title>
7+
<title>NexuStore - Particle Life</title>
88
<style>
99
/* Reset and base */
1010
* {
@@ -159,6 +159,89 @@
159159
background-color: rgba(0, 0, 0, 0.7);
160160
}
161161

162+
/* Download button styles */
163+
.download-buttons-container {
164+
display: flex;
165+
gap: 1rem;
166+
flex-wrap: wrap;
167+
margin-top: 1.5rem;
168+
}
169+
170+
.btn-download {
171+
flex: 1 1 150px;
172+
padding: 0.85rem 1.25rem;
173+
font-size: 1rem;
174+
font-weight: 700;
175+
color: white;
176+
border: none;
177+
border-radius: 8px;
178+
cursor: pointer;
179+
text-align: center;
180+
user-select: none;
181+
transition: background 0.3s ease;
182+
text-decoration: none;
183+
display: inline-block;
184+
}
185+
186+
.btn-windows {
187+
background: linear-gradient(135deg, #0078d7 0%, #005ea2 100%);
188+
}
189+
190+
.btn-windows:hover {
191+
background: linear-gradient(135deg, #005ea2 0%, #003f6b 100%);
192+
}
193+
194+
.btn-macos {
195+
background: linear-gradient(135deg, #333333 0%, #111111 100%);
196+
}
197+
198+
.btn-macos:hover {
199+
background: linear-gradient(135deg, #111111 0%, #000000 100%);
200+
}
201+
202+
.btn-linux {
203+
background: linear-gradient(135deg, #f0ad4e 0%, #c2851f 100%);
204+
color: #3a2e0f;
205+
}
206+
207+
.btn-linux:hover {
208+
background: linear-gradient(135deg, #c2851f 0%, #8a5b0d 100%);
209+
}
210+
211+
.btn-android {
212+
background: linear-gradient(135deg, #3ddc84 0%, #27ae60 100%);
213+
color: white;
214+
}
215+
216+
.btn-android:hover {
217+
background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
218+
}
219+
220+
.progress-container {
221+
margin-top: 2rem;
222+
display: none;
223+
}
224+
225+
.progress-label {
226+
font-weight: 600;
227+
margin-bottom: 0.5rem;
228+
}
229+
230+
.progress-bar {
231+
width: 100%;
232+
height: 20px;
233+
background-color: #ddd;
234+
border-radius: 10px;
235+
overflow: hidden;
236+
}
237+
238+
.progress-fill {
239+
height: 100%;
240+
background-color: #1e88e5;
241+
width: 0%;
242+
transition: width 0.4s ease;
243+
}
244+
162245
@keyframes spin {
163246
to { transform: translate(-50%, -50%) rotate(360deg); }
164247
}
@@ -175,7 +258,7 @@
175258
<a href="https://nexustore.github.io/" class="back-button" aria-label="Back to homepage">← Back to NexuStore</a>
176259

177260
<div class="game-container" id="gameContainer">
178-
<img src="https://hunar4321.github.io/particle-life/images/big_pic.jpg" alt="Incredibox background" class="thumbnail-background" />
261+
<img src="https://hunar4321.github.io/particle-life/images/big_pic.jpg" alt="Particle Life background" class="thumbnail-background" />
179262
<iframe class="game-iframe" id="gameIframe" src="" allowfullscreen></iframe>
180263
<button class="play-button" id="playButton" aria-label="Play game"></button>
181264
<div class="loading-spinner" id="loadingSpinner"></div>
@@ -184,11 +267,25 @@
184267

185268
<h1>Particle Life</h1>
186269
<p class="description">
187-
Thousands of particles interact and evolve, creating intricate, life-like structures based on simple, foundational rules.<br>
270+
Thousands of particles interact and evolve, creating intricate, life-like structures based on simple, foundational rules.
188271
</p>
272+
273+
<div class="download-buttons-container" id="downloadButtonsContainer">
274+
<button class="btn-download btn-windows" data-link="https://github.com/tom-mohr/particle-life-app/releases/latest/download/particle-life-app.zip" aria-label="Download for Windows">
275+
Download for Windows
276+
</button>
277+
</div>
278+
279+
<div class="progress-container" aria-live="polite" aria-atomic="true" aria-label="Download progress" id="progressContainer">
280+
<div class="progress-label" id="progressLabel">Download Progress</div>
281+
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" id="progressBar">
282+
<div class="progress-fill" id="progressFill"></div>
283+
</div>
284+
</div>
189285
</div>
190286

191287
<script>
288+
// Game play functionality
192289
const playButton = document.getElementById('playButton');
193290
const loadingSpinner = document.getElementById('loadingSpinner');
194291
const gameIframe = document.getElementById('gameIframe');
@@ -246,6 +343,47 @@ <h1>Particle Life</h1>
246343
fullscreenBtn.textContent = 'Fullscreen';
247344
}
248345
}
346+
347+
// Download functionality
348+
const buttons = document.querySelectorAll('.btn-download');
349+
const progressContainer = document.getElementById('progressContainer');
350+
const progressFill = document.getElementById('progressFill');
351+
const progressBar = document.getElementById('progressBar');
352+
const downloadButtonsContainer = document.getElementById('downloadButtonsContainer');
353+
let progress = 0;
354+
let downloadLink = '';
355+
356+
function startDownload(link) {
357+
downloadLink = link;
358+
progress = 0;
359+
progressFill.style.width = '0%';
360+
progressBar.setAttribute('aria-valuenow', 0);
361+
progressContainer.style.display = 'block';
362+
downloadButtonsContainer.style.display = 'none'; // Hide all download buttons
363+
simulateProgress();
364+
}
365+
366+
function simulateProgress() {
367+
if(progress < 100) {
368+
progress += Math.random() * 15 + 5;
369+
if(progress > 100) progress = 100;
370+
progressFill.style.width = progress + '%';
371+
progressBar.setAttribute('aria-valuenow', Math.floor(progress));
372+
setTimeout(simulateProgress, 300);
373+
} else {
374+
window.location.href = downloadLink;
375+
}
376+
}
377+
378+
buttons.forEach(button => {
379+
button.addEventListener('click', () => {
380+
if(progressContainer.style.display === 'block') return;
381+
const link = button.getAttribute('data-link');
382+
if(link) {
383+
startDownload(link);
384+
}
385+
});
386+
});
249387
</script>
250388
</body>
251389
</html>

0 commit comments

Comments
 (0)