Spaces:
Running
Running
Update index.html
Browse files- index.html +53 -18
index.html
CHANGED
@@ -1,19 +1,54 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="pt-BR">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Meu Servidor Minecraft</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
text-align: center;
|
11 |
+
background-color: #282c34;
|
12 |
+
color: white;
|
13 |
+
padding: 20px;
|
14 |
+
}
|
15 |
+
.server-info {
|
16 |
+
background: #444;
|
17 |
+
padding: 20px;
|
18 |
+
border-radius: 10px;
|
19 |
+
display: inline-block;
|
20 |
+
}
|
21 |
+
.status {
|
22 |
+
font-size: 20px;
|
23 |
+
font-weight: bold;
|
24 |
+
}
|
25 |
+
</style>
|
26 |
+
</head>
|
27 |
+
<body>
|
28 |
+
<h1>Bem-vindo ao Meu Servidor Minecraft</h1>
|
29 |
+
<div class="server-info">
|
30 |
+
<p><strong>Nome:</strong> Meu Server</p>
|
31 |
+
<p><strong>IP:</strong> mc.meuservidor.com</p>
|
32 |
+
<p class="status">Status: <span id="server-status">Carregando...</span></p>
|
33 |
+
</div>
|
34 |
+
|
35 |
+
<script>
|
36 |
+
async function fetchServerStatus() {
|
37 |
+
try {
|
38 |
+
const response = await fetch('https://api.mcsrvstat.us/2/mc.meuservidor.com');
|
39 |
+
const data = await response.json();
|
40 |
+
|
41 |
+
if (data.online) {
|
42 |
+
document.getElementById('server-status').innerText = `Online - ${data.players.online}/${data.players.max} jogadores`;
|
43 |
+
} else {
|
44 |
+
document.getElementById('server-status').innerText = 'Offline';
|
45 |
+
}
|
46 |
+
} catch (error) {
|
47 |
+
document.getElementById('server-status').innerText = 'Erro ao carregar';
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
fetchServerStatus();
|
52 |
+
</script>
|
53 |
+
</body>
|
54 |
</html>
|