-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
380 lines (359 loc) · 16.5 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
<!DOCTYPE html>
<html style="scroll-behavior: smooth;">
</div>
<head>
<link rel="icon" type="image/png" href="favicon.png">
<title>StarfallMC - Home</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Quicksand:wght@400;600;700&family=Rubik:wght@300;400;600&display=swap" rel="stylesheet">
<script>
document.addEventListener('DOMContentLoaded', function() {
// CSS styles for the circular button and sliding button
var styles = `
/* Styling for the circular button */
#minecraft-button {
position: fixed;
bottom: 20px;
left: 20px;
width: 50px;
height: 50px;
border-radius: 50%;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 9999;
background-size: 40px;
background-position: center;
background-repeat: no-repeat;
transition: transform 0.3s;
}
/* Styling for the sliding button */
#play-button {
position: fixed;
top: calc(95% - 25px);
left: calc(20px + 50px + 20px);
width: 295px;
height: 45px;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 9998;
transform: translateX(-100%);
transition: transform 0.3s, opacity 0.3s;
opacity: 0;
}
/* Styling for the sliding button image */
#play-button img {
width: 100%;
height: 100%;
object-fit: contain;
}
`;
var defaultImage = '/img/play-button-default.png';
var hoverImage = '/img/play-button-hover.png';
// Create the <style> tag and append it to the <head> element
var styleElement = document.createElement('style');
styleElement.innerHTML = styles;
document.head.appendChild(styleElement);
// Create the circular button
var button = document.createElement('div');
button.id = 'minecraft-button';
button.title = 'Minicraft';
document.body.appendChild(button);
// Get the button element
var buttonElement = document.getElementById('minecraft-button');
// Flag to track the state of the mini website (enlarged or not)
var isEnlarged = false;
// Function to handle button click event
function handleButtonClick() {
if (isEnlarged) {
buttonElement.style.transform = 'rotate(0deg)';
var playButtonElement = document.getElementById('play-button');
playButtonElement.style.transform = 'translateX(-100%)';
playButtonElement.style.opacity = 0;
setTimeout(function() {
playButtonElement.remove();
}, 300);
} else {
buttonElement.style.transform = 'rotate(360deg)';
var playButton = document.createElement('div');
playButton.id = 'play-button';
playButton.onmouseover = handleButtonHover;
playButton.onmouseout = function() {
var playButtonImageElement = document.getElementById('play-button-image');
playButtonImageElement.src = defaultImage;
};
playButton.innerHTML = '<img id="play-button-image" onclick="window.location.href = \'/Eaglercraft\';" src="/img/play-button-default.png" alt="Play">';
document.body.appendChild(playButton);
setTimeout(function() {
playButton.style.transform = 'translateX(0)';
playButton.style.opacity = 1;
}, 0);
}
isEnlarged = !isEnlarged;
}
// Function to handle the play button hover event
function handleButtonHover(event) {
var playButtonImageElement = document.getElementById('play-button-image');
playButtonImageElement.src = event.type === 'mouseover' ? hoverImage : defaultImage;
}
// Add click event listener to the button
buttonElement.addEventListener('click', handleButtonClick);
});
</script>
<script>
// Function to handle the visibility of the logout button
function handleLogoutButtonVisibility() {
const logoutButton = document.getElementById('logout-button');
const loginButton = document.getElementById('login-button');
const MyProfile = document.getElementById('MyProfile');
if (logoutButton) {
const token = getTokenFromCookie();
logoutButton.style.display = token ? 'block' : 'none';
loginButton.style.display = token ? 'none' : 'block';
MyProfile.style.display = token ? 'block' : 'none';
}
}
// Add event listener for DOMContentLoaded event
document.addEventListener('DOMContentLoaded', handleLogoutButtonVisibility);
</script>
<script>
window.addEventListener('load', function() {
if (window.location.hash === '#Home') {
const aboutSection = document.getElementById('nav');
if (aboutSection) {
const aboutSectionTop = aboutSection.offsetTop;
window.scrollTo({ top: aboutSectionTop, behavior: 'smooth' });
}
}
});
</script>
<script>
window.addEventListener('load', function() {
if (window.location.hash === '#Status') {
const aboutSection = document.getElementById('Status');
if (aboutSection) {
const aboutSectionTop = aboutSection.offsetTop;
window.scrollTo({ top: aboutSectionTop, behavior: 'smooth' });
}
}
});
</script>
<script>
window.addEventListener('load', function() {
if (window.location.hash === '#Gallery') {
const aboutSection = document.getElementById('Gallery');
if (aboutSection) {
const aboutSectionTop = aboutSection.offsetTop;
window.scrollTo({ top: aboutSectionTop, behavior: 'smooth' });
}
}
});
</script>
<script src="login.js"></script>
</head>
<body style="height: 3050px;">
<div id="initialPopup" class="overlay">
<div class="popup">
<button class="closeBtn" alt="X" onclick="hideInitialPopup()"></button>
<h2 style="color: gray;">Having trouble?</h2>
<div class="ph-installinstructions-body">
<p style="color: gray;">Click the button below to download and install Minecraft.</p>
<button onclick="hideInitialPopup(); showStepsContainer();" class="btn btn-primary downloadButton">Download and Install</button>
<p style="font-size: 15px; margin: 0; margin-top: 10px !important; color: gray;">Still not working? Use Realm Code: <strong>5c9gTQf9uZY</strong></p>
</div>
</div>
</div>
<div id="stepsContainer" class="overlay">
<div class="popup">
<button class="closeBtn" alt="X" onclick="hideStepsContainer()"></button>
<h2>How to download Minecraft?</h2>
<div style="color: gray;" class="ph-installinstructions-body">
<ul class="modal-col-4">
<li class="step1-of-4">
<h2 style="color: gray;">1</h2>
<p style="color: gray;" class="larger-font-size">Once <strong>Redirected</strong>, click on the button that appears in front of you. <p style="font-size: 15px; margin: 0; margin-top: 3px !important; color: gray;">If you're on PC press Save then double click the file.</p></p>
</li>
<li class="step2-of-4">
<h2 style="color: gray;">2</h2>
<p style="color: gray;" class="larger-font-size">Click <strong>Install</strong> when seen on your app store/installer to begin the installation process.</p>
</li>
<li class="step3-of-4">
<h2 style="color: gray;">3</h2>
<p style="color: gray;" class="larger-font-size">Click <strong>Open</strong> once you've successfully installed Minecraft.</p>
</li>
<li class="step4-of-4">
<h2 style="color: gray;">4</h2>
<p style="color: gray;" class="larger-font-size">After installation, click <strong>Join</strong> below to join the Realm!</p>
<div>
<a href="minecraft://acceptRealmInvite?inviteID=5c9gTQf9uZY" class="server-button">Join</a>
</div>
</li>
</ul>
<p style="font-size: 15px; margin: 0; margin-top: 5px !important; color: gray;">Didn't get redirected? <a href="https://www.minecraft.net/en-us/download" target="_blank" style="border-radius: none !important; background: none !important; color: gray; margin: 0 !important; padding: 0 !important;"><strong>Click Here</strong></a></p>
</div>
</div>
</div>
<script>
function rotateElement() {
var rotateElement = document.getElementById("profile-picture");
var popupanim = document.getElementById("popupContainer")
var currentTop = getComputedStyle(rotateElement).getPropertyValue("top");
if (currentTop === "200px") {
rotateElement.style.top = "10px";
rotateElement.style.transform = "";
popupanim.style.top = "-200px";
popupanim.style.opacity = 0;
} else {
rotateElement.style.top = "200px";
popupanim.style.top = "62px";
popupanim.style.opacity = 1;
rotateElement.style.transform = "rotate(360deg)";
}
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Select the element you want to check for cursor clicks
const element = document.getElementById('popupContainer');
// Add an event listener to the document to check for clicks
document.addEventListener('click', function(event) {
// Check if the click target is outside the element
if (!element.contains(event.target)) {
// Get the bounding rectangle of the element
const rect = element.getBoundingClientRect();
// Check if the top level of the element is at 62px
if (rect.top === 62) {
// Call the rotateElement() function
rotateElement();
}
}
});
});
</script>
<script>
function showInitialPopup() {
document.getElementById('initialPopup').classList.add('visible');
positionPopup();
window.addEventListener('scroll', positionPopup);
}
function hideInitialPopup() {
document.getElementById('initialPopup').classList.remove('visible');
window.removeEventListener('scroll', positionPopup);
}
function showStepsContainer() {
document.getElementById('stepsContainer').classList.add('visible');
window.addEventListener('scroll', positionPopup);
alert('By pressing ok you will be automatically redirected to the Minecraft Download page. Return here and keep following the instructions.');
window.open('https://www.minecraft.net/en-us/download', '_blank');
positionPopup();
}
function hideStepsContainer() {
document.getElementById('stepsContainer').classList.remove('visible');
window.removeEventListener('scroll', positionPopup);
}
function positionPopup() {
var popup = document.querySelector('.overlay.visible');
var scrollY = window.scrollY || window.pageYOffset;
var windowHeight = window.innerHeight;
var popupHeight = popup.offsetHeight;
var desiredPosition = scrollY + windowHeight / 2 - popupHeight / 2 - 30;
popup.style.top = desiredPosition + 'px';
}
window.addEventListener('scroll', positionPopup);
</script>
<div id="Loading" style="display: none; top: 0px;"><div id="loading-icon"></div></div>
<div class="navbar" id="nav">
<img onclick="window.location.replace('/');" class="Logo" width="38px" src="favicon.png" style="vertical-align: middle;" alt="⭐" />
<ul>
<li><a href="#Home">Home</a></li>
<li><a href="#About">About</a></li>
<li><a href="#Features">Features</a></li>
<li><a href="#Status">Status</a></li>
<li><a href="#Gallery">Gallery</a></li>
<li><a href="#Contact">Contact</a></li>
</ul>
<img onclick="rotateElement()" id="profile-picture" class="profile" width="40px" src="defaultprof.png" style="vertical-align: middle; top: 10px; rotate: 0deg;" alt="👤" />
</div>
<div id="popupContainer" style="top: -200px; opacity: 0;">
<button onclick="window.location.replace('/profile')" id="MyProfile">My Profile</button>
<button onclick="window.location.replace('https://login-widget.xsolla.com/latest/?projectId=8acf4777-fcd8-493f-9c77-f7e6563a4685&locale=en_US')" id="login-button">Login</button>
<button onclick="handleLogout()" id="logout-button" style="display: none;">Logout</button>
<p class="Gamertag" id="popup-username">Not signed in</p>
</div>
<div class="hero">
<div class="container">
<h1 style="margin: 0;">Welcome to <img id="emoji" src="StarfallEmoji.png" style="width:48px; height: 48px; vertical-align: middle; margin-bottom: 10px;" width="48px" alt="⭐" />StarfallMC<img id="emoji" width="48px" src="StarfallEmoji.png" style="vertical-align: middle; margin-bottom: 10px;" alt="⭐" />!</h1>
<p>A Minecraft server for gamers.</p>
<a href="minecraft://acceptRealmInvite?inviteID=5c9gTQf9uZY" onclick="showInitialPopup();" class="cta-button">Join Now</a>
</div>
</div>
<div class="section about-section">
<div class="container" id="About">
<h2>About StarfallMC</h2><h4>Information about the Realm.</h4>
<p>StarfallMC is a community-driven Minecraft multiplayer Realm. Explore a variety of games, make new friends, and build what you've dreamed of. Join us and become part of our thriving Minecraft community.</p>
</div>
</div>
<div class="section features-section" id="Features">
<div class="container">
<h2>Realm Features</h2><h4>Plugins and Features used to improve the Experience.</h4>
<div class="features-grid">
<div class="feature">
<div title="Survival" style="border-radius: 12px; background-image: url('img/Feature1.png'); size: cover; width: 100%; height: 100px; background-position: center center;"></div>
<h3>Survival Gameplay</h3>
<p>Experience the thrill of survival in a challenging Minecraft world.</p>
</div>
<div class="feature">
<div title="Economy System" style="border-radius: 12px; background-image: url('img/Feature2.png'); size: cover; width: 100%; height: 100px; background-position: center center;"></div>
<h3>Economy System</h3>
<p>Engage in a dynamic player-driven economy with currency and trade.</p>
</div>
<div class="feature">
<div title="Custom Plugins" style="border-radius: 12px; background-image: url('img/Feature3.png'); size: cover; width: 100%; height: 100px; background-position: left center;"></div>
<h3>Custom Plugins</h3>
<p>Enjoy unique gameplay enhancements and features with our custom plugins.</p>
</div>
</div>
</div>
</div>
<div class="section features-section" id="Status">
<div class="container">
<h2>Realm Status</h2><h4>Current status of the Realm.</h4>
<div id="serverStatus">
<p style="color: #00f1ff; font-weight: bold;">Unfortunetly Realms statuses are not retrieveable at the moment...</p>
</div>
</div>
</div>
<div class="section gallery-section" id="Gallery">
<div class="container">
<h2>Gallery</h2><h4>Screenshots taken inside the Realm.</h4>
<div class="gallery-grid">
<div class="SS" style="border-radius: 12px; background-image: url('img/SS1.png'); size: cover; width: 47%; height: 300px; background-position: center center;"><p class="credit">MassaHex</p></div>
<div class="SS" style="border-radius: 12px; background-image: url('img/SS2.png'); size: cover; width: 47%; height: 300px; background-position: center center;"><p class="credit">MassaHex</p></div>
<div class="SS" style="border-radius: 12px; background-image: url('img/SS3.png'); size: cover; width: 47%; height: 300px; background-position: center center;"><p class="credit">xXLiitkingXx</p></div>
<div class="SS" style="border-radius: 12px; background-image: url('img/SS4.png'); size: cover; width: 47%; height: 300px; background-position: center center;"><p class="credit">MapleChair69</p></div>
<a href="/gallery.html" class="ctag-button">More Screenshots</a>
</div>
</div>
</div>
<div class="section contact-section" id="Contact">
<div class="container">
<h2>Contact Us</h2>
<p>Have any questions or inquiries? Feel free to reach out to us on our discord.</p>
<a href="https://discord.gg/kBQvummBFN" class="ctad-button">Join Now</a>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2023 StarfallMC. All rights reserved.</p>
</div>
</div>
<button hidden onclick="scrollToTop()" id="scrollToTopBtn" title="Scroll to Top"></button>
</body>
</html>