Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +53 -44
templates/index.html
CHANGED
@@ -3,60 +3,69 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Sentinel
|
7 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
8 |
<script src="https://unpkg.com/[email protected]"></script>
|
9 |
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
10 |
<style>
|
11 |
-
:root { --pico-font-family: '
|
12 |
-
body { background-color: #111927;
|
13 |
-
.container { max-width:
|
14 |
-
|
15 |
-
h1 { color: #38BDF8; margin-bottom: 0
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
.
|
21 |
-
.
|
22 |
-
|
23 |
-
.
|
24 |
-
.
|
25 |
-
.
|
26 |
-
|
27 |
-
blockquote a { color: #E5E7EB; text-decoration: none; }
|
28 |
-
blockquote a:hover { text-decoration: underline; }
|
29 |
-
.card > footer { padding: 0.75rem 1.25rem; background-color: #374151; font-size: 0.9rem; border-top: 1px solid #4b5563; }
|
30 |
-
.impact-low { border-left-color: #38BDF8; }
|
31 |
-
.impact-medium { border-left-color: #FBBF24; }
|
32 |
-
.impact-high { border-left-color: #F87171; }
|
33 |
-
.sentiment-positive { color: #34D399; }
|
34 |
-
.sentiment-negative { color: #F87171; }
|
35 |
-
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
|
36 |
</style>
|
37 |
</head>
|
38 |
-
<body hx-ext="sse">
|
39 |
<main class="container">
|
40 |
-
<header
|
41 |
-
<h1>Sentinel
|
42 |
-
<p>Autonomous Low-Latency Signal Generation</p>
|
43 |
</header>
|
44 |
|
45 |
-
<
|
46 |
-
<span
|
47 |
-
</
|
48 |
-
|
49 |
-
<article
|
50 |
-
<
|
51 |
-
<
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
</article>
|
60 |
</main>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
</body>
|
62 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Sentinel Arbitrage Engine</title>
|
7 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
8 |
<script src="https://unpkg.com/[email protected]"></script>
|
9 |
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
10 |
<style>
|
11 |
+
:root { --pico-font-family: 'SF Mono', 'Consolas', 'Menlo', monospace; }
|
12 |
+
body { background-color: #111927; font-size: 14px; }
|
13 |
+
.container { max-width: 1280px; margin: 1rem auto; }
|
14 |
+
header { text-align: center; margin-bottom: 1.5rem; }
|
15 |
+
h1 { color: #38BDF8; margin-bottom: 0; }
|
16 |
+
table { width: 100%; border-collapse: separate; border-spacing: 0; }
|
17 |
+
th { background-color: #374151; }
|
18 |
+
td, th { padding: 0.75rem 1rem; border-bottom: 1px solid #374151; }
|
19 |
+
tbody tr:hover { background-color: #1f2937; }
|
20 |
+
.buy { color: #34D399; }
|
21 |
+
.sell { color: #F87171; }
|
22 |
+
.risk-low { color: #34D399; }
|
23 |
+
.risk-medium { color: #FBBF24; }
|
24 |
+
.risk-high { color: #F87171; }
|
25 |
+
.trade-btn { --pico-font-size: 12px; padding: 5px 10px; }
|
26 |
+
.status-bar { font-size: 12px; color: #9CA3AF; text-align: right; margin-bottom: 1rem; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</style>
|
28 |
</head>
|
29 |
+
<body hx-ext="sse" sse-connect="/api/signals/stream">
|
30 |
<main class="container">
|
31 |
+
<header>
|
32 |
+
<h1>Sentinel Arbitrage Engine</h1>
|
|
|
33 |
</header>
|
34 |
|
35 |
+
<div class="status-bar">
|
36 |
+
Engine Status: <span style="color: #34D399;">ONLINE</span> | Last Update: <span id="last-update-time">--:--:--</span>
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<article>
|
40 |
+
<table>
|
41 |
+
<thead>
|
42 |
+
<tr>
|
43 |
+
<th>Pair</th>
|
44 |
+
<th>Buy On</th>
|
45 |
+
<th>Sell On</th>
|
46 |
+
<th>Spread</th>
|
47 |
+
<th>Risk</th>
|
48 |
+
<th>Strategy</th>
|
49 |
+
<th>Est. Profit (1 BTC)</th>
|
50 |
+
<th>Action</th>
|
51 |
+
</tr>
|
52 |
+
</thead>
|
53 |
+
<tbody id="opportunities-table">
|
54 |
+
<!-- New arbitrage opportunities will appear here via SSE -->
|
55 |
+
<tr><td colspan="8" style="text-align:center; padding: 2rem; color: #9CA3AF;">Awaiting arbitrage opportunities...</td></tr>
|
56 |
+
</tbody>
|
57 |
+
</table>
|
58 |
</article>
|
59 |
</main>
|
60 |
+
|
61 |
+
<script>
|
62 |
+
// On the first message, clear the "Awaiting..." placeholder.
|
63 |
+
document.body.addEventListener('htmx:sseMessage', function(evt) {
|
64 |
+
const placeholder = document.querySelector('#opportunities-table tr:first-child td[colspan="8"]');
|
65 |
+
if (placeholder) {
|
66 |
+
placeholder.parentElement.remove();
|
67 |
+
}
|
68 |
+
});
|
69 |
+
</script>
|
70 |
</body>
|
71 |
</html>
|