-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMC.html
468 lines (403 loc) · 16.1 KB
/
MC.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Swightshome - Minecraft Vanilla Server</title>
<link rel="icon" href="https://raw.githubusercontent.com/SwightsNotFound/swightshome/main/images/Logonowhite.png" type="image/x-icon">
<style>
/* General body styling */
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f9;
color: #333;
display: flex;
flex-direction: column;
min-height: 100vh; /* This ensures the footer stays at the bottom */
transition: background-color 0.3s, color 0.3s; /* Smooth transition */
}
/* Dark mode body styling */
body.dark-mode {
background-color: #333;
color: #f4f4f9;
}
/* Topbar styling */
.topbar {
background-color: #2c3e50;
display: flex;
justify-content: center;
align-items: center;
padding: 15px 0;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
position: sticky; /* This ensures the top bar stays at the top */
top: 0;
z-index: 1000;
}
.topbar.dark-mode {
background-color: #1a252f;
}
/* Styling for the links in the topbar */
.topbar a {
color: white;
text-align: center;
padding: 12px 20px;
text-decoration: none;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 1px;
transition: all 0.3s ease;
}
/* Hover effect for links */
.topbar a:hover {
background-color: #3498db;
color: white;
border-radius: 5px;
}
/* Dark mode toggle button styling */
.dark-mode-toggle {
background: none;
border: none;
color: white;
font-size: 20px;
cursor: pointer;
transition: all 0.3s ease;
padding: 12px 20px;
text-align: center;
text-transform: uppercase;
font-weight: 500;
letter-spacing: 1px;
position: absolute;
left: 10px;
}
/* Remove blue background on hover for dark mode toggle button */
.dark-mode-toggle:hover {
color: white;
}
/* Main content area */
.content {
max-width: 1000px;
margin: 50px auto;
text-align: center;
padding: 20px;
flex-grow: 1; /* This will ensure content fills available space */
}
.content h1 {
font-size: 3rem;
color: #2c3e50;
margin-bottom: 20px;
}
.content.dark-mode h1 {
color: #f4f4f9;
}
.content p {
font-size: 1.2rem;
color: #7f8c8d;
line-height: 1.6;
}
.content a {
color: #3498db;
text-decoration: none;
font-weight: bold;
}
.content a:hover {
text-decoration: underline;
}
/* Add space between sections */
.section {
margin-bottom: 40px;
opacity: 0;
transform: translateY(20px);
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section.visible {
opacity: 1;
transform: translateY(0);
}
/* Footer Styling */
footer {
background-color: #2c3e50;
color: white;
padding: 20px;
text-align: center;
}
footer.dark-mode {
background-color: #1a252f;
}
footer a {
color: #3498db;
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
/* Responsive styling */
@media (max-width: 768px) {
.topbar {
flex-direction: column;
padding: 10px;
}
.topbar a {
padding: 10px;
width: 100%;
text-align: center;
}
.content h1 {
font-size: 2rem;
}
.content p {
font-size: 1rem;
}
.dark-mode-toggle, .return-button {
position: relative;
top: 10px;
left: auto;
}
}
/* Modern input and button styling */
.copy-container {
position: relative;
width: 300px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 10px;
display: flex;
align-items: center;
justify-content: space-between;
transition: box-shadow 0.3s ease;
}
.copy-container:hover {
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.copy-container input {
padding: 10px;
font-size: 1rem;
border: 2px solid #3498db;
border-radius: 5px;
width: calc(100% - 50px); /* Adjust width to leave space for the button */
background-color: #fff;
color: #333;
transition: all 0.3s ease;
outline: none;
}
.copy-container input:focus {
border-color: #2980b9;
}
.copy-container button {
padding: 10px;
background-color: #3498db;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s ease;
}
.copy-container button:hover {
background-color: #2980b9;
}
.copy-container button img {
width: 20px;
height: 20px;
}
/* Visibility control for button states */
.copy-container .copied {
display: none;
}
.copy-container .copied.visible {
display: block;
}
.copy-container .clipboard-icon.visible {
display: block;
}
.copy-container .clipboard-icon.hidden {
display: none;
}
/* Home button styling */
.home-button {
display: flex;
align-items: center;
justify-content: center;
padding: 0 20px;
transition: all 0.3s ease;
position: absolute;
left: 60px; /* Adjusted position to be next to dark mode toggle */
}
.home-icon {
width: 24px;
height: 24px;
transition: transform 0.3s ease;
}
.home-button:hover .home-icon {
transform: scale(1.2);
}
.topbar a.home-button:hover {
background-color: transparent; /* Remove background color change on hover */
}
</style>
</head>
<body>
<!-- Topbar with links -->
<div class="topbar" id="topbar">
<button id="darkModeToggle" class="dark-mode-toggle">🌙</button>
<a href="https://swightshome.xyz" class="home-button" title="Home">
<svg class="home-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 9L12 3l9 6v12a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V12H9v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9z"/>
</svg>
</a>
<a href="Services">Services</a>
<a href="Projects">Projects</a>
<a href="Overview">Lists</a>
<a href="Links">Links</a>
<a href="Contact">Contact</a>
</div>
<!-- Main content -->
<div class="content" id="content">
<div class="section">
<h1>How to join The Vanilla Minecraft server</h1>
<p>Do note that you need to have been added to the whitelist to join.</p>
<p>I also support cracked players, so if you don’t own a legit copy of minecraft you can still play.</p>
</div>
<div class="section">
<h2>You will want/need a custom minecraft launcher, I would use one of these:</h2>
<p>• <a href="https://prismlauncher.org/" role="button">Prism Launcher</a></p>
<p>• <a href="https://modrinth.com/app" role="button">Modrinth Launcher/App</a></p> <p style="font-size: 0.9rem; color: #7f8c8d;">(or this <a href="https://github.com/DIDIRUS4/AstralRinth" role="button">fork</a> that removes some of its bloat, also works as a cracked client).</p>
<p>• <a href="https://atlauncher.com/" role="button">Atlauncher</a>.</p>
</div>
<div class="section">
<h2>Download one of these modpacks:</h2>
<p>• <a href="https://raw.githubusercontent.com/SwightsNotFound/swightshome/main/Downloads/Swightshome.mrpack" download>Swightshome (Fabric)</a></p> <p style="font-size: 1rem; color: #7f8c8d;">The main modpack, most up to date and all the recommended mods.</p>
<p>• <a href="https://raw.githubusercontent.com/SwightsNotFound/swightshome/main/Downloads/Swightshome.mrpack" download>Swightshome (Neoforge)</a></p> <p style="font-size: 1rem; color: #7f8c8d;">This is a backup pack for people who have issues with fabric, missing some mods, though I try to properly replace them all with proper alternatives.</p>
<p style="font-size: 1rem; color: #7f8c8d;">These modpacks are already setup and made specifically to run well on this server.</p>
</div>
<div class="section">
<h2>Alternative:</h2>
<p>If you don’t want to use those modpacks for whatever reason, all you need is a 1.21.4 Minecraft instance with <a href="https://modrinth.com/mod/modflared" role="button">Modflared</a> installed on it.</p>
</div>
<!-- Copy and paste box for server IP -->
<div class="section">
<p>Once you have that add this IP as a server:</p>
<div class="copy-container">
<input type="text" value="mc.swightshome.xyz" id="serverAddress" readonly>
<button onclick="copyToClipboard()">
<img src="https://raw.githubusercontent.com/SwightsNotFound/swightshome/main/images/copy.svg" alt="Clipboard" id="clipboardIcon" class="clipboard-icon visible"/>
<img src="https://raw.githubusercontent.com/SwightsNotFound/swightshome/main/images/copyconfirm.svg" alt="Checkmark" id="checkmarkIcon" class="copied"/>
</button>
</div>
</div>
</div>
<!-- Footer -->
<footer id="footer">
<p>Hosted using <a href="https://pages.github.com/" target="_blank" rel="noopener" role="button">Github Pages</a> and <a href="https://www.cloudflare.com/" target="_blank" rel="noopener" role="button">Cloudflare</a>.</p>
<div class="footer-links">
<a href="https://swightshome.xyz/Status" role="button">Status Page</a>
<span>|</span>
<a href="https://github.com/SwightsNotFound/swightshome" role="button">Source Code</a>
<span>|</span>
<a href="Privacy" role="button">Privacy Policy</a>
</div>
</footer>
<script>
function copyToClipboard() {
var copyText = document.getElementById("serverAddress");
var clipboardIcon = document.getElementById("clipboardIcon");
var checkmarkIcon = document.getElementById("checkmarkIcon");
// Select the text field
copyText.select();
copyText.setSelectionRange(0, 99999); // For mobile devices
// Execute the copy command
document.execCommand("copy");
// Change the icon to the checkmark icon
clipboardIcon.classList.add("hidden");
checkmarkIcon.classList.add("visible");
// After 2 seconds, reset the icons
setTimeout(function() {
clipboardIcon.classList.remove("hidden");
checkmarkIcon.classList.remove("visible");
}, 2000);
}
// Utility functions for handling cookies
function setCookie(name, value, days) {
const d = new Date();
d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000));
const expires = "expires=" + d.toUTCString();
document.cookie = name + "=" + value + ";" + expires + ";path=/";
}
function getCookie(name) {
const cname = name + "=";
const decodedCookie = decodeURIComponent(document.cookie);
const ca = decodedCookie.split(';');
for (let i = 0; i < ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(cname) == 0) {
return c.substring(cname.length, c.length);
}
}
return "";
}
// Apply dark mode based on preference before the page loads
(function() {
const darkModePreference = getCookie("darkMode");
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)").matches;
if (darkModePreference === "enabled" || (darkModePreference === "" && prefersDarkScheme)) {
document.documentElement.classList.add('dark-mode');
}
})();
// Function to check visibility of elements and add the 'visible' class
function checkVisibility() {
const sections = document.querySelectorAll('.section');
sections.forEach(section => {
const sectionTop = section.getBoundingClientRect().top;
const sectionBottom = section.getBoundingClientRect().bottom;
// Check if the section is in the viewport
if (sectionTop < window.innerHeight && sectionBottom > 0) {
section.classList.add('visible');
}
});
}
// Apply dark mode preference on load
document.addEventListener('DOMContentLoaded', (event) => {
applyDarkModePreference();
// Initial check for visibility
checkVisibility();
// Check visibility on scroll
window.addEventListener('scroll', checkVisibility);
});
// Function to apply dark mode based on preference
function applyDarkModePreference() {
const darkModePreference = getCookie("darkMode");
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)").matches;
if (darkModePreference === "enabled" || (darkModePreference === "" && prefersDarkScheme)) {
document.body.classList.add('dark-mode');
document.getElementById('topbar').classList.add('dark-mode');
document.getElementById('content').classList.add('dark-mode');
document.getElementById('footer').classList.add('dark-mode');
// Set the dark mode toggle button to sun
document.getElementById('darkModeToggle').textContent = '☀️';
}
}
// Toggle dark mode
const darkModeToggle = document.getElementById('darkModeToggle');
darkModeToggle.addEventListener('click', () => {
const isDarkMode = document.body.classList.toggle('dark-mode');
document.getElementById('topbar').classList.toggle('dark-mode');
document.getElementById('content').classList.toggle('dark-mode');
document.getElementById('footer').classList.toggle('dark-mode');
// Change the icon of the dark mode toggle button
darkModeToggle.textContent = isDarkMode ? '☀️' : '🌙';
// Set the dark mode preference in a cookie
setCookie("darkMode", isDarkMode ? "enabled" : "disabled", 365);
});
</script>
</body>
</html>