-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
91 lines (81 loc) · 3.32 KB
/
Copy pathindex.html
File metadata and controls
91 lines (81 loc) · 3.32 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Railcraft</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<div class="overlay"></div>
<div class="container">
<header>
<h1>Welcome to <span class="highlight">RAILCRAFT</span></h1>
<p class="tagline">The official survival minecraft server of Railway Challenge at Sheffield!</p>
</header>
<main>
<div class="ip-box">
<p>Join us at:</p>
<div class="ip-address" id="serverIP">minecraft.arthurhind.com</div>
<button class="btn" onclick="copyIP()">Copy Server Address</button>
</div>
<section class="features">
<div class="card">
<h3>Server Information</h3>
<p><div class="info"></div></p>
</div>
<a href="https://discord.gg/q8rBwPZP" style="text-decoration:none">
<div class="card">
<h3>Join our Discord</h3>
<p>Join the Discord for voice channels and train discussions.</p>
</div>
</a>
<div class="card">
<h3>Free to play</h3>
<p>Free to play for all RCAS team members!</p>
</div>
</section>
<main>
<div class="ip-box">
<p>Players online:</p>
<div class="players"></div>
</div>
</main>
<footer>
<p>© 2026 RAILCRAFT Server. Not affiliated with Mojang Studios.</p>
</footer>
</div>
<script>
$.getJSON('https://api.mcsrvstat.us/3/minecraft.arthurhind.com', function(data) {
var text = `Current Players: ${data.players.online} / ${data.players.max} <br>
Java Version: ${data.protocol.name}`
$(".info").html(text);
var player_info;
if (data.players.online == 0) {
player_info = `<div class="player-wrapper">No players online</div>`
} else {
for (let i=0; i < data.players.list.length; i++) {
player_info += `<div class="player-wrapper"><img src="https://minotar.net/helm/${data.players.list[i].uuid}/32.png" class="default" width="32" height="32"> ${data.players.list[i].name}</div>`;
if (i < data.players.list.length - 1) {
player_info += '</br>'
}
}
}
$(".players").html(player_info.replace("undefined", ""));
});
</script>
<script>
function copyIP() {
const ipText = document.getElementById("serverIP").innerText;
navigator.clipboard.writeText(ipText).then(() => {
alert("Server IP copied to clipboard!");
}).catch(err => {
console.error('Failed to copy: ', err);
});
}
</script>
</body>
</html>