Spaces:
Paused
Paused
fix: total reconstruction of UI to solve black screen
Browse files- index.html +51 -1
- internal/handler/index.html +28 -54
index.html
CHANGED
|
@@ -1 +1,51 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang='es'>
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset='UTF-8'>
|
| 5 |
+
<title>ROW-PROXY // FRENTE ORIENTAL</title>
|
| 6 |
+
<style>
|
| 7 |
+
body { background: #0d0d0c; color: #d4d4d4; font-family: 'Courier New', monospace; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
|
| 8 |
+
.monitor { width: 100%; max-width: 900px; background: rgba(26, 18, 0, 0.4); border: 1px solid #3a2a00; padding: 30px; box-shadow: inset 0 0 50px #000; }
|
| 9 |
+
.section-header { color: #7a6228; font-size: 11px; letter-spacing: 4px; text-align: center; margin-bottom: 20px; border-bottom: 1px solid #2a2a1f; padding-bottom: 10px; }
|
| 10 |
+
h2 { color: #ff3333; font-size: 16px; letter-spacing: 3px; margin-bottom: 25px; text-align: center; font-weight: bold; }
|
| 11 |
+
h2::before { content: '★ '; }
|
| 12 |
+
.ranking-row { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
|
| 13 |
+
.name { color: #daa520; width: 140px; font-size: 14px; font-weight: bold; flex-shrink: 0; text-transform: uppercase; }
|
| 14 |
+
.bar-container { flex-grow: 1; background: #080808; height: 18px; border: 1px solid #2a2a1f; }
|
| 15 |
+
.bar { background: #cc0000; height: 100%; transition: width 1s ease; }
|
| 16 |
+
.tokens { color: #c8a84b; width: 120px; text-align: right; font-size: 12px; font-weight: bold; }
|
| 17 |
+
.url-box { margin-top: 40px; padding-top: 20px; border-top: 1px solid #2a2a1f; text-align: center; }
|
| 18 |
+
.url-val { color: #e8c86b; font-size: 13px; font-weight: bold; }
|
| 19 |
+
</style>
|
| 20 |
+
</head>
|
| 21 |
+
<body>
|
| 22 |
+
<div class='monitor'>
|
| 23 |
+
<div class='section-header'>// HOI4 - NO STEP BACK - MONITOREO ESTRATÉGICO</div>
|
| 24 |
+
<h2>ESTADO DE COMANDANTES (TOKENS)</h2>
|
| 25 |
+
<div id='ranking-frente'></div>
|
| 26 |
+
<div class='url-box'>
|
| 27 |
+
<div style='color: #7a6228; font-size: 10px; margin-bottom: 5px;'>PUNTO DE ACCESO SEGURO</div>
|
| 28 |
+
<div class='url-val'>https://moge-row-row-proxy.hf.space/v1</div>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
<script>
|
| 32 |
+
async function update(){
|
| 33 |
+
try {
|
| 34 |
+
const r = await fetch(window.location.origin + '/stats');
|
| 35 |
+
const d = await r.json();
|
| 36 |
+
const c = document.getElementById('ranking-frente');
|
| 37 |
+
const e = Object.entries(d.keys || {}).map(([n, i]) => ({name: n, tokens: i.tokens || 0})).sort((a, b) => b.tokens - a.tokens);
|
| 38 |
+
if (e.length === 0) { c.innerHTML = '<div style="text-align:center;color:#7a6228">ESPERANDO REPORTE...</div>'; return; }
|
| 39 |
+
const m = Math.max(...e.map(x => x.tokens), 1);
|
| 40 |
+
c.innerHTML = e.map(u => `
|
| 41 |
+
<div class='ranking-row'>
|
| 42 |
+
<div class='name'>${u.name}</div>
|
| 43 |
+
<div class='bar-container'><div class='bar' style='width:${(u.tokens/m)*100}%'></div></div>
|
| 44 |
+
<div class='tokens'>${u.tokens.toLocaleString()} TKNS</div>
|
| 45 |
+
</div>`).join('');
|
| 46 |
+
} catch(e) {}
|
| 47 |
+
}
|
| 48 |
+
setInterval(update, 5000); update();
|
| 49 |
+
</script>
|
| 50 |
+
</body>
|
| 51 |
+
</html>
|
internal/handler/index.html
CHANGED
|
@@ -4,74 +4,48 @@
|
|
| 4 |
<meta charset='UTF-8'>
|
| 5 |
<title>ROW-PROXY // FRENTE ORIENTAL</title>
|
| 6 |
<style>
|
| 7 |
-
body { background: #0d0d0c; color: #d4d4d4; font-family: 'Courier New', monospace; padding: 20px;
|
| 8 |
-
.monitor { max-width:
|
| 9 |
-
.section-header { color: #7a6228; font-size:
|
| 10 |
-
|
| 11 |
-
h2 { color: #ff3333; font-size: 14px; letter-spacing: 2px; margin-bottom: 20px; font-weight: bold; }
|
| 12 |
h2::before { content: '★ '; }
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
.
|
| 16 |
-
.
|
| 17 |
-
.
|
| 18 |
-
.
|
| 19 |
-
.
|
| 20 |
-
|
| 21 |
-
.quote { border-left: 3px solid #ff3333; background: rgba(255, 0, 0, 0.03); padding: 15px; margin-top: 25px; font-style: italic; color: #888; font-size: 13px; }
|
| 22 |
-
.url-display { color: #e8c86b; font-size: 14px; border-left: 3px solid #cc0000; padding-left: 15px; margin-top: 10px; }
|
| 23 |
</style>
|
| 24 |
</head>
|
| 25 |
<body>
|
| 26 |
<div class='monitor'>
|
| 27 |
-
<div class='section-header'>// HOI4 - NO STEP BACK - MONITOREO
|
| 28 |
-
|
| 29 |
-
<div
|
| 30 |
-
|
| 31 |
-
<div
|
| 32 |
-
|
| 33 |
-
</div>
|
| 34 |
-
</div>
|
| 35 |
-
|
| 36 |
-
<div class='quote'>
|
| 37 |
-
"La victoria es para aquellos que no retroceden. Ni un paso atras."<br>
|
| 38 |
-
— Orden No. 227, Stalin — 1942 — NO STEP BACK
|
| 39 |
-
</div>
|
| 40 |
-
|
| 41 |
-
<div class='section-header'>// PUNTO DE ACCESO</div>
|
| 42 |
-
<div class='url-display'>
|
| 43 |
-
BASE URL: https://moge-row-row-proxy.hf.space/v1
|
| 44 |
</div>
|
| 45 |
</div>
|
| 46 |
-
|
| 47 |
<script>
|
| 48 |
-
async function
|
| 49 |
try {
|
| 50 |
const r = await fetch(window.location.origin + '/stats');
|
| 51 |
-
const
|
| 52 |
-
const
|
| 53 |
-
const
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
if (entries.length === 0) {
|
| 59 |
-
container.innerHTML = '<div style="color:#7a6228; text-align:center;">ESPERANDO REPORTE DE INTELIGENCIA...</div>';
|
| 60 |
-
return;
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
const maxTokens = Math.max(...entries.map(e => e.tokens), 5000);
|
| 64 |
-
container.innerHTML = entries.map(u => `
|
| 65 |
<div class='ranking-row'>
|
| 66 |
<div class='name'>${u.name}</div>
|
| 67 |
-
<div class='bar-container'><div class='bar' style='width:${
|
| 68 |
<div class='tokens'>${u.tokens.toLocaleString()} TKNS</div>
|
| 69 |
-
</div>
|
| 70 |
-
|
| 71 |
-
} catch(e) { console.error('Error de enlace:', e); }
|
| 72 |
}
|
| 73 |
-
setInterval(
|
| 74 |
-
updateStats();
|
| 75 |
</script>
|
| 76 |
</body>
|
| 77 |
</html>
|
|
|
|
| 4 |
<meta charset='UTF-8'>
|
| 5 |
<title>ROW-PROXY // FRENTE ORIENTAL</title>
|
| 6 |
<style>
|
| 7 |
+
body { background: #0d0d0c; color: #d4d4d4; font-family: 'Courier New', monospace; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
|
| 8 |
+
.monitor { width: 100%; max-width: 900px; background: rgba(26, 18, 0, 0.4); border: 1px solid #3a2a00; padding: 30px; box-shadow: inset 0 0 50px #000; }
|
| 9 |
+
.section-header { color: #7a6228; font-size: 11px; letter-spacing: 4px; text-align: center; margin-bottom: 20px; border-bottom: 1px solid #2a2a1f; padding-bottom: 10px; }
|
| 10 |
+
h2 { color: #ff3333; font-size: 16px; letter-spacing: 3px; margin-bottom: 25px; text-align: center; font-weight: bold; }
|
|
|
|
| 11 |
h2::before { content: '★ '; }
|
| 12 |
+
.ranking-row { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
|
| 13 |
+
.name { color: #daa520; width: 140px; font-size: 14px; font-weight: bold; flex-shrink: 0; text-transform: uppercase; }
|
| 14 |
+
.bar-container { flex-grow: 1; background: #080808; height: 18px; border: 1px solid #2a2a1f; }
|
| 15 |
+
.bar { background: #cc0000; height: 100%; transition: width 1s ease; }
|
| 16 |
+
.tokens { color: #c8a84b; width: 120px; text-align: right; font-size: 12px; font-weight: bold; }
|
| 17 |
+
.url-box { margin-top: 40px; padding-top: 20px; border-top: 1px solid #2a2a1f; text-align: center; }
|
| 18 |
+
.url-val { color: #e8c86b; font-size: 13px; font-weight: bold; }
|
|
|
|
|
|
|
|
|
|
| 19 |
</style>
|
| 20 |
</head>
|
| 21 |
<body>
|
| 22 |
<div class='monitor'>
|
| 23 |
+
<div class='section-header'>// HOI4 - NO STEP BACK - MONITOREO ESTRATÉGICO</div>
|
| 24 |
+
<h2>ESTADO DE COMANDANTES (TOKENS)</h2>
|
| 25 |
+
<div id='ranking-frente'></div>
|
| 26 |
+
<div class='url-box'>
|
| 27 |
+
<div style='color: #7a6228; font-size: 10px; margin-bottom: 5px;'>PUNTO DE ACCESO SEGURO</div>
|
| 28 |
+
<div class='url-val'>https://moge-row-row-proxy.hf.space/v1</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
</div>
|
| 30 |
</div>
|
|
|
|
| 31 |
<script>
|
| 32 |
+
async function update(){
|
| 33 |
try {
|
| 34 |
const r = await fetch(window.location.origin + '/stats');
|
| 35 |
+
const d = await r.json();
|
| 36 |
+
const c = document.getElementById('ranking-frente');
|
| 37 |
+
const e = Object.entries(d.keys || {}).map(([n, i]) => ({name: n, tokens: i.tokens || 0})).sort((a, b) => b.tokens - a.tokens);
|
| 38 |
+
if (e.length === 0) { c.innerHTML = '<div style="text-align:center;color:#7a6228">ESPERANDO REPORTE...</div>'; return; }
|
| 39 |
+
const m = Math.max(...e.map(x => x.tokens), 1);
|
| 40 |
+
c.innerHTML = e.map(u => `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
<div class='ranking-row'>
|
| 42 |
<div class='name'>${u.name}</div>
|
| 43 |
+
<div class='bar-container'><div class='bar' style='width:${(u.tokens/m)*100}%'></div></div>
|
| 44 |
<div class='tokens'>${u.tokens.toLocaleString()} TKNS</div>
|
| 45 |
+
</div>`).join('');
|
| 46 |
+
} catch(e) {}
|
|
|
|
| 47 |
}
|
| 48 |
+
setInterval(update, 5000); update();
|
|
|
|
| 49 |
</script>
|
| 50 |
</body>
|
| 51 |
</html>
|