Row-proxy / index.html
Moge-Row's picture
add models handler
8b1550f
raw
history blame
4.25 kB
<!DOCTYPE html>
<html lang='es'>
<head>
<meta charset='UTF-8'>
<title>ROW-PROXY // FRENTE ORIENTAL</title>
<style>
body { background: #0d0d0c; color: #d4d4d4; font-family: 'Courier New', monospace; padding: 20px; line-height: 1.2; }
.monitor { max-width: 1000px; margin: auto; }
.section-header { color: #7a6228; font-size: 12px; letter-spacing: 4px; margin: 20px 0 10px 0; border-bottom: 1px solid #2a2a1f; padding-bottom: 5px; }
.box { background: rgba(26, 18, 0, 0.4); border: 1px solid #3a2a00; padding: 20px; margin-bottom: 20px; position: relative; }
h2 { color: #ff3333; font-size: 14px; letter-spacing: 2px; margin-bottom: 15px; font-weight: bold; }
h2::before { content: 'β˜… '; }
.ranking-row { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.name { color: #daa520; width: 120px; font-size: 13px; font-weight: bold; flex-shrink: 0; }
.bar-container { flex-grow: 1; background: #080808; height: 14px; border: 1px solid #222; }
.bar { background: #cc0000; height: 100%; transition: width 0.8s ease-out; }
.tokens { color: #7a6228; width: 100px; text-align: right; font-size: 11px; }
.focus-tree { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.focus-node { border: 1px solid #ff3333; color: #ff3333; padding: 5px 10px; font-size: 10px; text-transform: uppercase; background: rgba(255,0,0,0.05); }
.quote { border-left: 3px solid #ff3333; background: rgba(255, 0, 0, 0.03); padding: 15px; margin-top: 20px; font-style: italic; color: #888; }
.url-display { color: #e8c86b; font-size: 14px; border-left: 3px solid #cc0000; padding-left: 15px; }
</style>
</head>
<body>
<div class='monitor'>
<div class='section-header'>// HOI4 - NO STEP BACK - FRENTE ORIENTAL</div>
<div class='box'>
<h2>TOP USUARIOS (COMANDANTES)</h2>
<div id='ranking-frente'>
<div style='color:#7a6228; text-align:center; padding:10px;'>CONECTANDO AL SERVIDOR CENTRAL...</div>
</div>
</div>
<div class='box'>
<h2>ARBOL DE ENFOQUE SOVIETICO</h2>
<div class='focus-tree'>
<div class='focus-node'>INDUSTRIA DE GUERRA</div>
<div class='focus-node'>COLLECTIVIZACION</div>
<div class='focus-node'>PURGA MILITAR</div>
<div class='focus-node'>LEND-LEASE</div>
<div class='focus-node'>PACTO RIBBENTROP</div>
<div class='focus-node'>DEFENSA EN PROFUNDIDAD</div>
<div class='focus-node'>FRENTE POPULAR</div>
</div>
</div>
<div class='quote'>
"La victoria es para aquellos que no retroceden. Ni un paso atras."<br>
β€” Orden No. 227, Stalin β€” 1942 β€” NO STEP BACK
</div>
<div class='section-header'>// PUNTO DE ACCESO</div>
<div class='url-display'>BASE URL: https://moge-row-row-proxy.hf.space/v1</div>
</div>
<script>
async function updateStats() {
try {
const r = await fetch(window.location.origin + '/stats');
const data = await r.json();
const container = document.getElementById('ranking-frente');
const entries = Object.entries(data.keys || {}).map(([name, info]) => ({
name: name,
tokens: info.tokens || 0
})).sort((a, b) => b.tokens - a.tokens);
if (entries.length === 0) return;
const maxTokens = Math.max(...entries.map(e => e.tokens), 5000);
container.innerHTML = entries.map(u => `
<div class='ranking-row'>
<div class='name'>${u.name.toUpperCase()}</div>
<div class='bar-container'><div class='bar' style='width:${Math.min((u.tokens/maxTokens)*100, 100)}%'></div></div>
<div class='tokens'>${u.tokens.toLocaleString()} TKNS</div>
</div>`).join('');
} catch(e) { console.error(e); }
}
setInterval(updateStats, 5000); updateStats();
</script>
</body>
</html>