kuoramwoyo commited on
Commit
dced274
·
verified ·
1 Parent(s): 6d73e4f

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +53 -18
index.html CHANGED
@@ -1,19 +1,54 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>