Moge-Row commited on
Commit
7eba786
Β·
1 Parent(s): 8d32bac

ui: final HOI4 soviet focus tree interface

Browse files
Files changed (1) hide show
  1. internal/handler/index.html +62 -50
internal/handler/index.html CHANGED
@@ -2,74 +2,86 @@
2
  <html lang="es">
3
  <head>
4
  <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>ROW-PROXY // CCCP</title>
7
  <style>
8
- *{box-sizing:border-box;margin:0;padding:0}
9
- body{background:#0d0d0d;font-family:"Courier New",monospace;color:#c8a84b}
10
- .header{background:#1a1200;border-bottom:2px solid #c8a84b;padding:1.5rem 2rem;display:flex;align-items:center;gap:1rem}
11
- .star{color:#cc0000;font-size:28px}
12
- .header-title{font-size:22px;font-weight:bold;letter-spacing:4px;color:#c8a84b}
13
- .header-sub{font-size:11px;letter-spacing:3px;color:#7a6228;margin-top:2px}
14
- .red-bar{height:4px;background:#cc0000}
15
- .content{padding:2rem}
16
- .section-label{font-size:10px;letter-spacing:4px;color:#7a6228;border-bottom:1px solid #3a2a00;padding-bottom:6px;margin-bottom:1rem}
17
- .tank-section{background:#1a1200;border:1px solid #3a2a00;padding:1.5rem;margin-bottom:2rem}
18
- .tank-title{font-size:14px;color:#cc0000;letter-spacing:3px;margin-bottom:1rem;font-weight:bold}
19
- .tank-row{display:flex;gap:1rem;margin-bottom:8px;align-items:center}
20
- .tank-name{font-size:12px;color:#e8c86b;width:120px;flex-shrink:0}
21
- .tank-bar-wrap{flex:1;background:#0d0d0d;height:16px;border:1px solid #3a2a00}
22
- .tank-bar{height:100%;background:#cc0000;transition: width 0.5s ease-in-out;}
23
- .tank-tokens{font-size:10px;color:#c8a84b;width:100px;text-align:right}
24
- .url-box{background:#111;border:1px solid #3a2a00;border-left:3px solid #cc0000;padding:1rem 1.25rem;margin-bottom:2rem}
25
- .url-val{font-size:13px;color:#e8c86b;word-break:break-all}
26
- .footer{border-top:1px solid #3a2a00;padding:1rem 2rem;text-align:center;font-size:10px;color:#4a3a10;letter-spacing:3px}
 
27
  </style>
28
  </head>
29
  <body>
30
- <div class="header">
31
- <div class="star">β˜…</div>
32
- <div>
33
- <div class="header-title">ROW-PROXY // CCCP</div>
34
- <div class="header-sub">SOVIET ARMORED DIVISION β€” AI GATEWAY SYSTEM</div>
 
 
 
35
  </div>
36
- </div>
37
- <div class="red-bar"></div>
38
- <div class="content">
39
- <div class="section-label">// REPORTE DE INTELIGENCIA DE COMANDANTES</div>
40
- <div class="tank-section" id="ranking-container">
41
- <div class="tank-title">β˜… ESTADO DEL FRENTE ORIENTAL (TOKENS)</div>
42
- <div style="color:#7a6228; text-align:center; padding:20px;">SINCRONIZANDO CON EL KREMLIN...</div>
 
 
 
 
 
 
 
 
 
 
43
  </div>
44
- <div class="section-label">// PUNTO DE ACCESO</div>
45
- <div class="url-box">
46
- <div style="font-size:10px;color:#7a6228;letter-spacing:3px;margin-bottom:6px">BASE URL</div>
47
- <div class="url-val">https://moge-row-row-proxy.hf.space/v1</div>
48
  </div>
49
  </div>
50
- <div class="footer">β˜… CLASIFICADO β˜… β€” ROW-PROXY v1.0 β€” CCCP AI β€” β˜… CLASIFICADO β˜…</div>
51
  <script>
52
  async function updateStats() {
53
  try {
54
  const r = await fetch(window.location.origin + "/stats");
55
  const data = await r.json();
56
- const container = document.getElementById("ranking-container");
57
  const entries = Object.entries(data.keys || {}).map(([name, info]) => ({
58
  name: name,
59
  tokens: info.tokens || 0
60
  })).sort((a, b) => b.tokens - a.tokens);
 
61
  if (entries.length === 0) return;
62
- let html = "<div class=\"tank-title\">β˜… ESTADO DEL FRENTE ORIENTAL (TOKENS)</div>";
63
- const maxTokens = Math.max(...entries.map(e => e.tokens), 1000);
64
- entries.forEach(u => {
65
- const width = Math.min((u.tokens / maxTokens) * 100, 100);
66
- html += `<div class="tank-row">
67
- <div class="tank-name">${u.name.toUpperCase()}</div>
68
- <div class="tank-bar-wrap"><div class="tank-bar" style="width:${width}%"></div></div>
69
- <div class="tank-tokens">${u.tokens.toLocaleString()} TKNS</div>
70
- </div>`;
71
- });
72
- container.innerHTML = html;
73
  } catch(e) { console.error(e); }
74
  }
75
  setInterval(updateStats, 5000); updateStats();
 
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; line-height: 1.2; }
8
+ .monitor { max-width: 1000px; margin: auto; }
9
+ .section-header { color: #7a6228; font-size: 12px; letter-spacing: 4px; margin: 20px 0 10px 0; border-bottom: 1px solid #2a2a1f; padding-bottom: 5px; }
10
+ .box { background: rgba(26, 18, 0, 0.4); border: 1px solid #3a2a00; padding: 20px; margin-bottom: 20px; position: relative; }
11
+ h2 { color: #ff3333; font-size: 14px; letter-spacing: 2px; margin-bottom: 15px; font-weight: bold; }
12
+ h2::before { content: "β˜… "; }
13
+
14
+ /* Estilo HOI4 Rankings */
15
+ .ranking-row { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
16
+ .name { color: #daa520; width: 120px; font-size: 13px; font-weight: bold; flex-shrink: 0; }
17
+ .bar-container { flex-grow: 1; background: #080808; height: 14px; border: 1px solid #222; }
18
+ .bar { background: #cc0000; height: 100%; transition: width 0.8s ease-out; }
19
+ .tokens { color: #7a6228; width: 100px; text-align: right; font-size: 11px; }
20
+
21
+ /* Arbol de Enfoque */
22
+ .focus-tree { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
23
+ .focus-node { border: 1px solid #ff3333; color: #ff3333; padding: 5px 10px; font-size: 10px; text-transform: uppercase; background: rgba(255,0,0,0.05); }
24
+
25
+ .quote { border-left: 3px solid #ff3333; background: rgba(255, 0, 0, 0.03); padding: 15px; margin-top: 20px; font-style: italic; color: #888; }
26
+ .url-display { color: #e8c86b; font-size: 14px; border-left: 3px solid #cc0000; padding-left: 15px; }
27
  </style>
28
  </head>
29
  <body>
30
+ <div class="monitor">
31
+ <div class="section-header">// HOI4 - NO STEP BACK - FRENTE ORIENTAL</div>
32
+
33
+ <div class="box">
34
+ <h2>TOP USUARIOS (COMANDANTES)</h2>
35
+ <div id="ranking-frente">
36
+ <div style="color:#7a6228; text-align:center; padding:10px;">CONECTANDO AL SERVIDOR CENTRAL...</div>
37
+ </div>
38
  </div>
39
+
40
+ <div class="box">
41
+ <h2>ARBOL DE ENFOQUE SOVIETICO</h2>
42
+ <div class="focus-tree">
43
+ <div class="focus-node">INDUSTRIA DE GUERRA</div>
44
+ <div class="focus-node">COLLECTIVIZACION</div>
45
+ <div class="focus-node">PURGA MILITAR</div>
46
+ <div class="focus-node">LEND-LEASE</div>
47
+ <div class="focus-node">PACTO RIBBENTROP</div>
48
+ <div class="focus-node">DEFENSA EN PROFUNDIDAD</div>
49
+ <div class="focus-node">FRENTE POPULAR</div>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="quote">
54
+ "La victoria es para aquellos que no retroceden. Ni un paso atras."<br>
55
+ β€” Orden No. 227, Stalin β€” 1942 β€” NO STEP BACK
56
  </div>
57
+
58
+ <div class="section-header">// PUNTO DE ACCESO</div>
59
+ <div class="url-display">
60
+ BASE URL: https://moge-row-row-proxy.hf.space/v1
61
  </div>
62
  </div>
63
+
64
  <script>
65
  async function updateStats() {
66
  try {
67
  const r = await fetch(window.location.origin + "/stats");
68
  const data = await r.json();
69
+ const container = document.getElementById("ranking-frente");
70
  const entries = Object.entries(data.keys || {}).map(([name, info]) => ({
71
  name: name,
72
  tokens: info.tokens || 0
73
  })).sort((a, b) => b.tokens - a.tokens);
74
+
75
  if (entries.length === 0) return;
76
+
77
+ const maxTokens = Math.max(...entries.map(e => e.tokens), 5000);
78
+ container.innerHTML = entries.map(u => `
79
+ <div class="ranking-row">
80
+ <div class="name">${u.name.toUpperCase()}</div>
81
+ <div class="bar-container"><div class="bar" style="width:${Math.min((u.tokens/maxTokens)*100, 100)}%"></div></div>
82
+ <div class="tokens">${u.tokens.toLocaleString()} TKNS</div>
83
+ </div>
84
+ `).join("");
 
 
85
  } catch(e) { console.error(e); }
86
  }
87
  setInterval(updateStats, 5000); updateStats();