-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
514 lines (445 loc) · 18.9 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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>StationeersMods</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@400;500&display=swap"
rel="stylesheet">
<!-- Font Awesome CDN link for icons -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<style>
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(135deg, #4a90e2, #6b8fe9);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: #333;
position: relative;
overflow-x: hidden;
line-height: 1.6;
}
.background-image {
position: absolute;
/* Changed to absolute for proper scrolling */
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('https://rocketwerkz.com/wp-content/uploads/stationeers-bg-02-scaled.jpg');
background-size: cover;
background-position: center;
z-index: -1;
filter: brightness(50%);
transform: translateZ(0);
/* Ensures proper rendering */
will-change: transform;
background-attachment: scroll;
/* Scroll effect for background */
transition: transform 0.2s ease-out;
}
.container {
max-width: 1200px;
width: 100%;
padding: 40px;
background: rgba(255, 255, 255, 0.1);
border-radius: 20px;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(5px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
h1 {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: #fff;
text-align: center;
margin-bottom: 40px;
font-size: 4rem;
text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
h2 {
font-family: 'Poppins', sans-serif;
font-weight: 600;
color: #fff;
text-align: center;
margin-bottom: 30px;
font-size: 2.5rem;
}
h3 {
font-family: 'Poppins', sans-serif;
font-weight: 500;
color: #e67e22;
}
code {
color: #e67e22;
}
.instructions {
background: rgba(0, 0, 0, 0.8);
padding: 40px;
border-radius: 15px;
margin-bottom: 40px;
box-shadow: 0 8px 50px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(10px);
color: #fff;
width: 100%;
text-align: left;
}
.instructions h2 {
font-size: 26px;
color: #e67e22;
border-bottom: 4px solid #4A90E2;
padding-bottom: 8px;
margin-bottom: 25px;
}
p {
font-size: 18px;
color: #ddd;
margin-bottom: 25px;
line-height: 1.7;
}
ol {
margin-left: 20px;
padding-left: 10px;
list-style-type: decimal;
color: #ddd;
}
a {
color: #4A90E2;
text-decoration: none;
font-weight: 500;
transition: color 0.3s ease;
}
a:hover {
color: #e67e22;
text-decoration: underline;
}
.download-button {
display: inline-block;
padding: 14px 32px;
background-color: #4A90E2;
color: #fff;
border-radius: 30px;
font-size: 18px;
text-align: center;
text-decoration: none;
transition: all 0.3s ease;
margin: 20px 0;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
position: relative;
overflow: hidden;
background: linear-gradient(45deg, #4A90E2 25%, #357ABD 75%);
background-size: 200% 200%;
}
.download-button:hover {
background-position: 100% 0;
transform: translateY(-8px);
box-shadow: 0 10px 10px rgba(70, 160, 255, 1), 0 10px 15px rgba(70, 160, 255, 0.4);
text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
border: 1px solid #5bc0de;
background: linear-gradient(45deg, #5bc0de 25%, #4A90E2 75%);
color: white;
/* Ensures text stays white on hover */
}
.download-button:active {
transform: translateY(8px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.download-button .fa-download {
font-size: 20px;
margin-right: 10px;
transition: transform 0.3s ease;
}
.download-button:hover .fa-download {
transform: rotate(360deg);
}
/* Flexbox to display cards side by side */
.release-container {
display: flex;
justify-content: space-between;
gap: 40px;
width: 100%;
margin-top: 50px;
}
.release {
background: rgba(0, 0, 0, 0.8);
padding: 30px;
border-radius: 20px;
text-align: center;
color: #fff;
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
width: 48%;
backdrop-filter: blur(8px);
transform: translateY(50px);
opacity: 0;
animation: slideInUp 1s ease forwards;
}
/* Slide in animation for the cards */
@keyframes slideInUp {
0% {
transform: translateY(50px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.release h3 {
margin-bottom: 15px;
font-size: 22px;
color: #e67e22;
}
.version-text {
font-size: 16px;
color: #ddd;
margin-bottom: 20px;
}
#google_translate_element {
position: absolute;
top: 20px;
right: 20px;
z-index: 10;
background-color: rgba(0, 0, 0, 0.3);
border-radius: 50px;
padding: 10px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
body {
animation: fadeInUp 1s ease-out;
}
@keyframes fadeInUp {
0% {
opacity: 0;
transform: translateY(30px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
/* Glow Effect Only on Hover (Bottom Glow) */
.download-button {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
/* Standard shadow */
}
.download-button:hover {
box-shadow: 0 6px 10px rgba(70, 160, 255, 1), 0 12px 30px rgba(70, 160, 255, 0.6);
/* Brighter, bottom-focused glow */
}
/* Floating Action Button for Discord */
.fab-discord {
position: fixed;
bottom: 30px;
right: 30px;
background-color: #7289da;
color: white;
padding: 16px;
border-radius: 12px;
/* Rounded corners */
font-size: 32px;
/* Increased icon size */
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
z-index: 100;
width: 60px;
/* Keep the button square */
height: 60px;
/* Keep the button square */
display: flex;
justify-content: center;
align-items: center;
}
.fab-discord:hover {
background-color: #5b6e9c;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
transform: translateY(-5px);
}
</style>
</head>
<body>
<!-- Google Translate Widget -->
<div id="google_translate_element"></div>
<!-- Parallax Background -->
<div class="background-image"></div>
<div class="container">
<h1>Welcome to StationeersMods</h1>
<!-- Instructions Section with Dark Theme -->
<div class="release-container">
<div class="instructions">
<h2>Installation Instructions</h2>
<p>StationeersMods is a Bepinex plugin that helps you load mods you subscribed to from the workshop.
Follow the instructions below to get started.</p>
<ol id="installation-steps">
<!-- Installation steps will be inserted here by JavaScript -->
</ol>
<div class="button-container">
<a id="bepinex-link" class="download-button" href="#">Download BepInEx</a>
</div>
<p>For help, join us on <a href="https://discord.gg/AEmQR3XCGm" target="_blank">Discord</a>.</p>
</div>
</div>
<!-- Release Versions Section -->
<h2>Latest Releases</h2>
<div class="release-container">
<div class="release">
<h3>Stable Version</h3>
<p class="version-text">
<strong>Version:</strong> <span id="stable-version">Loading...</span>
</p>
<p class="explain-text">
This version is recommended for most users and will automatically update itself.
</p>
<div class="button-container">
<a id="stable-link" class="download-button" href="#">Download Stable Release</a>
</div>
</div>
<div class="release">
<h3>Beta Version</h3>
<p class="version-text">
<strong>Version:</strong> <span id="beta-version">Loading...</span>
</p>
<p class="explain-text">
This version is intended to be compatible with the beta branch of Stationeers. It is not guaranteed
to work. You will need to install it manually whenever there is a beta. This button will download
the latest beta version or stable version, whichever is newest.
</p>
<div class="button-container">
<a id="beta-link" class="download-button" href="#">Download Beta Release</a>
</div>
</div>
</div>
</div>
<!-- Floating Action Button for Discord -->
<a href="https://discord.gg/AEmQR3XCGm" class="fab-discord" target="_blank">
<i class="fab fa-discord"></i>
</a>
<script>
// Initialize Google Translate
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
includedLanguages: 'en,es,de,fr,it,pt,ru,zh-CN',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
// Fetch releases
async function fetchReleases() {
const responseStable = await fetch('https://api.github.com/repos/jixxed/StationeersMods/releases/latest');
const responseBeta = await fetch('https://api.github.com/repos/jixxed/StationeersMods/releases');
const releasesBeta = await responseBeta.json();
const stableRelease = await responseStable.json();
const betaRelease = releasesBeta.find(release => release.prerelease);
const stableVersion = stableRelease ? stableRelease.tag_name : 'N/A';
const betaVersion = betaRelease ? betaRelease.tag_name : 'N/A';
document.getElementById('stable-version').textContent = stableVersion;
// Function to compare version numbers
function compareVersions(v1, v2) {
const v1Parts = v1.replace('v', '').split('.').map(Number);
const v2Parts = v2.replace('v', '').split('.').map(Number);
for (let i = 0; i < Math.max(v1Parts.length, v2Parts.length); i++) {
const v1Part = v1Parts[i] || 0; // Default to 0 if part is missing
const v2Part = v2Parts[i] || 0; // Default to 0 if part is missing
if (v1Part > v2Part) return 1;
if (v1Part < v2Part) return -1;
}
return 0; // Versions are equal
}
function getDownloadUrl(release) {
if (!release || !release.assets) return '#';
const zipAsset = release.assets.find(asset => asset.name.toLowerCase().includes('stationeersmods.zip'));
return zipAsset ? zipAsset.browser_download_url : '#';
}
// Compare the stable and beta versions
const versionComparison = compareVersions(stableVersion, betaVersion);
// Set the stable link to the zip asset
document.getElementById('stable-link').href = getDownloadUrl(stableRelease);
// Provide the stable link if the stable version is higher
if (versionComparison > 0) {
document.getElementById('beta-link').href = document.getElementById('stable-link').href;
} else {
document.getElementById('beta-link').href = getDownloadUrl(betaRelease);
}
document.getElementById('beta-version').textContent = betaVersion;
}
async function fetchBepInExRelease() {
const response = await fetch('https://api.github.com/repos/BepInEx/BepInEx/releases/latest');
const release = await response.json();
function getBepInExDownloadUrl(release) {
if (!release || !release.assets) return '#';
let assetName;
const platform = navigator.platform.toLowerCase();
if (platform.includes('win')) {
assetName = 'BepInEx_win_x64';
} else if (platform.includes('mac')) {
assetName = 'BepInEx_macos_x64';
} else if (platform.includes('linux')) {
assetName = 'BepInEx_linux_x64';
} else {
return '#'; // Default to a placeholder if platform is not recognized
}
const asset = release.assets.find(asset => asset.name.includes(assetName));
return asset ? asset.browser_download_url : '#';
}
document.getElementById('bepinex-link').href = getBepInExDownloadUrl(release);
}
function setInstallationSteps() {
const platform = navigator.platform.toLowerCase();
const stepsContainer = document.getElementById('installation-steps');
let stepsHtml = '';
if (platform.includes('win')) {
stepsHtml = `
<li>Download the latest version of BepInEx for your platform below and extract it to your Stationeers installation directory. You should end up with a <code>BepInEx</code> folder, <code>winhttp.dll</code>, <code>doorstop_config.ini</code> and <code>.doorstop_version</code> in the same directory as your <code>Stationeers.exe</code> file.</li>
<li>Start the game once to generate the necessary files and folders, then close the game.</li>
<li>Download the latest version of StationeersMods below and extract it to the <code>BepInEx/plugins/</code> folder, which was created in the previous step. You should end up with a <code>BepInEx/plugins/StationeersMods</code> folder with a couple of <code>dll</code> files in it.</li>
<li>Install mods from the workshop and enjoy your game!</li>
`;
} else if (platform.includes('mac') || platform.includes('linux')) {
stepsHtml = `
<li>Download the latest version of BepInEx for your platform below and extract it to your Stationeers installation directory. You should end up with a <code>BepInEx</code> folder in the same directory as your <code>Stationeers</code> executable file.</li>
<li>Open a terminal and navigate to your Stationeers installation directory.</li>
<li>Run the following command to set the executable permissions for the BepInEx scripts:</li>
<pre><code>chmod +x ./BepInEx/*</code></pre>
<li>Start the game once to generate the necessary files and folders, then close the game.</li>
<li>Download the latest version of StationeersMods below and extract it to the <code>BepInEx/plugins/</code> folder, which was created in the previous step. You should end up with a <code>BepInEx/plugins/StationeersMods</code> folder with a couple of <code>dll</code> files in it.</li>
<li>Install mods from the workshop and enjoy your game!</li>
`;
} else {
stepsHtml = `
<li>Download the latest version of BepInEx for your platform below and extract it to your Stationeers installation directory. You should end up with a <code>BepInEx</code> folder in the same directory as your <code>Stationeers</code> executable file.</li>
<li>Start the game once to generate the necessary files and folders, then close the game.</li>
<li>Download the latest version of StationeersMods below and extract it to the <code>BepInEx/plugins/</code> folder, which was created in the previous step. You should end up with a <code>BepInEx/plugins/StationeersMods</code> folder with a couple of <code>dll</code> files in it.</li>
<li>Install mods from the workshop and enjoy your game!</li>
`;
}
stepsContainer.innerHTML = stepsHtml;
}
setInstallationSteps();
fetchReleases();
fetchBepInExRelease();
// Smoother parallax scrolling with requestAnimationFrame
let lastScrollY = 0;
let ticking = false;
function updateParallax() {
const scrollY = window.scrollY;
const parallaxSpeed = 0.5;
const bg = document.querySelector('.background-image');
bg.style.transform = `translateY(${scrollY * parallaxSpeed}px)`;
ticking = false;
}
window.addEventListener('scroll', function () {
if (!ticking) {
window.requestAnimationFrame(updateParallax);
ticking = true;
}
});
</script>
</body>
</html>