Dashboard V9: Simplified Clean Design - No Sidebar
- REMOVED: Sidebar navigation (no added value) - LAYOUT: Clean centered content, full width - METRICS: Minimum 2 tiles per row (Portfolio + USDT) - DESKTOP: 3 tiles in row (Portfolio, USDT, Positions) - MOBILE: 2x2 grid layout (always 2 per row) - DESIGN: Same grayscale + green accents - TABLES: Live Prices + Holdings sections below - PERFORMANCE: Smooth animations, loading optimized - RESPONSIVE: Modern CSS Grid with minmax - TYPOGRAPHY: Fluid scaling via clamp() - FOOTER: None (clean end) - VERSION: V9 ENHANCED
This commit is contained in:
parent
b7b311e3cf
commit
ec1e7213cc
|
|
@ -103,7 +103,7 @@ async def root():
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
||||||
<title>Trading Bot V8</title>
|
<title>Trading Bot V9</title>
|
||||||
<style>
|
<style>
|
||||||
:root {{
|
:root {{
|
||||||
--bg-primary: #1a1a1a;
|
--bg-primary: #1a1a1a;
|
||||||
|
|
@ -138,113 +138,43 @@ body {{
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.app-container {{
|
.app-container {{
|
||||||
display: flex;
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
flex-direction: row;
|
|
||||||
}}
|
|
||||||
|
|
||||||
/* ===== SIDEBAR ===== */
|
|
||||||
.sidebar {{
|
|
||||||
width: 260px;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
border-right: 1px solid var(--border);
|
|
||||||
padding: var(--spacing);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow-y: auto;
|
|
||||||
transition: transform 0.3s ease;
|
|
||||||
}}
|
|
||||||
|
|
||||||
.sidebar-header {{
|
|
||||||
font-size: clamp(12px, 3vw, 14px);
|
|
||||||
font-weight: bold;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
color: var(--accent);
|
|
||||||
margin-bottom: calc(var(--spacing) * 1.5);
|
|
||||||
padding-bottom: calc(var(--spacing) * 0.75);
|
|
||||||
border-bottom: 1px solid var(--border);
|
|
||||||
}}
|
|
||||||
|
|
||||||
.sidebar-item {{
|
|
||||||
padding: calc(var(--spacing) * 0.75) var(--spacing);
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
font-size: clamp(12px, 2vw, 13px);
|
|
||||||
color: var(--text-secondary);
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: all 0.2s;
|
|
||||||
border-left: 2px solid transparent;
|
|
||||||
padding-left: calc(var(--spacing) * 0.75);
|
|
||||||
}}
|
|
||||||
|
|
||||||
.sidebar-item:hover {{
|
|
||||||
background: var(--bg-hover);
|
|
||||||
color: var(--accent);
|
|
||||||
}}
|
|
||||||
|
|
||||||
.sidebar-item.active {{
|
|
||||||
background: var(--bg-tertiary);
|
|
||||||
color: var(--accent);
|
|
||||||
border-left-color: var(--accent);
|
|
||||||
}}
|
|
||||||
|
|
||||||
.menu-toggle {{
|
|
||||||
display: none;
|
|
||||||
background: var(--bg-tertiary);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
color: var(--accent);
|
|
||||||
padding: calc(var(--spacing) * 0.75);
|
|
||||||
cursor: pointer;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 18px;
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: var(--spacing);
|
|
||||||
}}
|
|
||||||
|
|
||||||
/* ===== MAIN CONTENT ===== */
|
|
||||||
.main {{
|
|
||||||
flex: 1;
|
|
||||||
padding: calc(var(--spacing) * 1.5);
|
padding: calc(var(--spacing) * 1.5);
|
||||||
overflow-y: auto;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.header {{
|
.header {{
|
||||||
margin-bottom: calc(var(--spacing) * 2);
|
margin-bottom: calc(var(--spacing) * 2.5);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.logo {{
|
.logo {{
|
||||||
font-size: clamp(20px, 5vw, 28px);
|
font-size: clamp(24px, 6vw, 32px);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.5rem;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.version {{
|
.version {{
|
||||||
font-size: clamp(11px, 2vw, 12px);
|
font-size: clamp(11px, 2vw, 13px);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
/* ===== METRICS GRID ===== */
|
/* ===== METRICS GRID ===== */
|
||||||
.metrics-grid {{
|
.metrics-grid {{
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||||
gap: calc(var(--spacing) * 1.25);
|
gap: calc(var(--spacing) * 1.5);
|
||||||
margin-bottom: calc(var(--spacing) * 2.5);
|
margin-bottom: calc(var(--spacing) * 3);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metric-card {{
|
.metric-card {{
|
||||||
background: var(--bg-tertiary);
|
background: var(--bg-tertiary);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
padding: calc(var(--spacing) * 1.25);
|
padding: calc(var(--spacing) * 1.5);
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
min-height: 120px;
|
min-height: 140px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -257,18 +187,19 @@ body {{
|
||||||
.metric-card:hover {{
|
.metric-card:hover {{
|
||||||
background: var(--bg-hover);
|
background: var(--bg-hover);
|
||||||
border-color: var(--accent);
|
border-color: var(--accent);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metric-label {{
|
.metric-label {{
|
||||||
font-size: clamp(10px, 1.5vw, 11px);
|
font-size: clamp(11px, 1.5vw, 12px);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.8px;
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 1rem;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metric-value {{
|
.metric-value {{
|
||||||
font-size: clamp(18px, 4vw, 28px);
|
font-size: clamp(20px, 5vw, 32px);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
|
@ -280,15 +211,15 @@ body {{
|
||||||
|
|
||||||
/* ===== SECTIONS ===== */
|
/* ===== SECTIONS ===== */
|
||||||
.section {{
|
.section {{
|
||||||
margin-bottom: calc(var(--spacing) * 2.5);
|
margin-bottom: calc(var(--spacing) * 3);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.section-title {{
|
.section-title {{
|
||||||
font-size: clamp(12px, 2.5vw, 14px);
|
font-size: clamp(13px, 2.5vw, 15px);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1.2px;
|
||||||
margin-bottom: var(--spacing);
|
margin-bottom: calc(var(--spacing) * 1.25);
|
||||||
padding-bottom: calc(var(--spacing) * 0.75);
|
padding-bottom: calc(var(--spacing) * 0.75);
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
}}
|
}}
|
||||||
|
|
@ -297,30 +228,32 @@ body {{
|
||||||
.table-wrapper {{
|
.table-wrapper {{
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
|
background: var(--bg-tertiary);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
table {{
|
table {{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
font-size: clamp(11px, 2vw, 13px);
|
font-size: clamp(12px, 2vw, 14px);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
th {{
|
th {{
|
||||||
background: var(--bg-tertiary);
|
background: var(--bg-tertiary);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
padding: calc(var(--spacing) * 0.75);
|
padding: calc(var(--spacing) * 1);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.6px;
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
font-size: clamp(10px, 1.5vw, 12px);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
td {{
|
td {{
|
||||||
padding: calc(var(--spacing) * 0.75);
|
padding: calc(var(--spacing) * 0.875);
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
@ -328,12 +261,16 @@ tr:last-child td {{
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
tbody tr {{
|
||||||
|
transition: background 0.2s ease;
|
||||||
|
}}
|
||||||
|
|
||||||
tbody tr:hover {{
|
tbody tr:hover {{
|
||||||
background: var(--bg-hover);
|
background: var(--bg-hover);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
tbody tr:active {{
|
tbody tr:active {{
|
||||||
background: var(--bg-tertiary);
|
background: var(--bg-secondary);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.price-positive {{
|
.price-positive {{
|
||||||
|
|
@ -342,9 +279,9 @@ tbody tr:active {{
|
||||||
}}
|
}}
|
||||||
|
|
||||||
/* ===== RESPONSIVE ===== */
|
/* ===== RESPONSIVE ===== */
|
||||||
@media (max-width: 1024px) {{
|
@media (max-width: 1200px) {{
|
||||||
.metrics-grid {{
|
.metrics-grid {{
|
||||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
@ -354,29 +291,7 @@ tbody tr:active {{
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.app-container {{
|
.app-container {{
|
||||||
flex-direction: column;
|
padding: calc(var(--spacing) * 1.25);
|
||||||
}}
|
|
||||||
|
|
||||||
.sidebar {{
|
|
||||||
width: 100%;
|
|
||||||
border-right: none;
|
|
||||||
border-bottom: 1px solid var(--border);
|
|
||||||
padding: var(--spacing);
|
|
||||||
max-height: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: max-height 0.3s ease;
|
|
||||||
}}
|
|
||||||
|
|
||||||
.sidebar.active {{
|
|
||||||
max-height: 500px;
|
|
||||||
}}
|
|
||||||
|
|
||||||
.menu-toggle {{
|
|
||||||
display: flex;
|
|
||||||
}}
|
|
||||||
|
|
||||||
.main {{
|
|
||||||
padding: var(--spacing);
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metrics-grid {{
|
.metrics-grid {{
|
||||||
|
|
@ -384,17 +299,31 @@ tbody tr:active {{
|
||||||
gap: var(--spacing);
|
gap: var(--spacing);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.section {{
|
.metric-card {{
|
||||||
margin-bottom: var(--spacing);
|
padding: var(--spacing);
|
||||||
|
min-height: 120px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
th, td {{
|
.metric-label {{
|
||||||
padding: calc(var(--spacing) * 0.6);
|
margin-bottom: 0.75rem;
|
||||||
font-size: 11px;
|
font-size: 10px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metric-value {{
|
.metric-value {{
|
||||||
font-size: clamp(16px, 3vw, 22px);
|
font-size: clamp(18px, 4vw, 26px);
|
||||||
|
}}
|
||||||
|
|
||||||
|
.section {{
|
||||||
|
margin-bottom: calc(var(--spacing) * 1.75);
|
||||||
|
}}
|
||||||
|
|
||||||
|
th, td {{
|
||||||
|
padding: calc(var(--spacing) * 0.75);
|
||||||
|
font-size: 11px;
|
||||||
|
}}
|
||||||
|
|
||||||
|
th {{
|
||||||
|
font-size: 10px;
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
@ -403,44 +332,54 @@ tbody tr:active {{
|
||||||
--spacing: 0.75rem;
|
--spacing: 0.75rem;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.sidebar {{
|
.app-container {{
|
||||||
padding: calc(var(--spacing) * 0.75);
|
padding: var(--spacing);
|
||||||
}}
|
|
||||||
|
|
||||||
.main {{
|
|
||||||
padding: calc(var(--spacing) * 0.75);
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metrics-grid {{
|
.metrics-grid {{
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: repeat(2, 1fr);
|
||||||
gap: calc(var(--spacing) * 0.75);
|
gap: calc(var(--spacing) * 0.75);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metric-card {{
|
.metric-card {{
|
||||||
padding: var(--spacing);
|
padding: calc(var(--spacing) * 0.875);
|
||||||
min-height: 100px;
|
min-height: 110px;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.metric-label {{
|
||||||
|
font-size: 9px;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.metric-value {{
|
.metric-value {{
|
||||||
font-size: clamp(14px, 2.5vw, 18px);
|
font-size: clamp(16px, 3.5vw, 22px);
|
||||||
|
}}
|
||||||
|
|
||||||
|
.logo {{
|
||||||
|
font-size: clamp(20px, 5vw, 26px);
|
||||||
|
}}
|
||||||
|
|
||||||
|
.version {{
|
||||||
|
font-size: 10px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.section-title {{
|
.section-title {{
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
margin-bottom: calc(var(--spacing) * 0.75);
|
margin-bottom: var(--spacing);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
th, td {{
|
th, td {{
|
||||||
padding: calc(var(--spacing) * 0.5);
|
padding: calc(var(--spacing) * 0.6);
|
||||||
font-size: 10px;
|
font-size: 9px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
table {{
|
th {{
|
||||||
font-size: 10px;
|
font-size: 8px;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
.logo {{
|
.table-wrapper {{
|
||||||
font-size: clamp(18px, 4vw, 24px);
|
border-radius: 6px;
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
@ -462,77 +401,90 @@ tbody tr:active {{
|
||||||
::-webkit-scrollbar-thumb:hover {{
|
::-webkit-scrollbar-thumb:hover {{
|
||||||
background: var(--text-secondary);
|
background: var(--text-secondary);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
/* ===== ANIMATIONS ===== */
|
||||||
|
@keyframes fadeIn {{
|
||||||
|
from {{
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(10px);
|
||||||
|
}}
|
||||||
|
to {{
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}}
|
||||||
|
}}
|
||||||
|
|
||||||
|
.metric-card {{
|
||||||
|
animation: fadeIn 0.5s ease forwards;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.metric-card:nth-child(2) {{
|
||||||
|
animation-delay: 0.1s;
|
||||||
|
}}
|
||||||
|
|
||||||
|
.metric-card:nth-child(3) {{
|
||||||
|
animation-delay: 0.2s;
|
||||||
|
}}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<button class="menu-toggle" onclick="toggleSidebar()">☰</button>
|
<div class="header">
|
||||||
|
<div class="logo">💰 Trading Bot</div>
|
||||||
<div class="sidebar" id="sidebar">
|
<div class="version">V9 — Real-time Portfolio Dashboard</div>
|
||||||
<div class="sidebar-header">⚙️ Status</div>
|
|
||||||
<div class="sidebar-item active">🟢 Running</div>
|
|
||||||
<div class="sidebar-item">📊 Analytics</div>
|
|
||||||
<div class="sidebar-item">⚡ Performance</div>
|
|
||||||
<div class="sidebar-item">🔧 Settings</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main">
|
<div class="metrics-grid">
|
||||||
<div class="header">
|
<div class="metric-card">
|
||||||
<div class="logo">💰 Trading Bot</div>
|
<div class="metric-label">Portfolio Value</div>
|
||||||
<div class="version">V8 — Real-time Portfolio</div>
|
<div class="metric-value">${portfolio_val:.2f}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="metric-card">
|
||||||
<div class="metrics-grid">
|
<div class="metric-label">USDT Available</div>
|
||||||
<div class="metric-card">
|
<div class="metric-value accent">${usdt_free:.2f}</div>
|
||||||
<div class="metric-label">Portfolio Value</div>
|
|
||||||
<div class="metric-value">${portfolio_val:.2f}</div>
|
|
||||||
</div>
|
|
||||||
<div class="metric-card">
|
|
||||||
<div class="metric-label">USDT Available</div>
|
|
||||||
<div class="metric-value accent">${usdt_free:.2f}</div>
|
|
||||||
</div>
|
|
||||||
<div class="metric-card">
|
|
||||||
<div class="metric-label">Open Positions</div>
|
|
||||||
<div class="metric-value">{trades_count}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="metric-card">
|
||||||
|
<div class="metric-label">Open Positions</div>
|
||||||
|
<div class="metric-value">{trades_count}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="section-title">Live Prices</div>
|
<div class="section-title">Live Prices</div>
|
||||||
<div class="table-wrapper">
|
<div class="table-wrapper">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Asset</th>
|
<th>Asset</th>
|
||||||
<th>Price</th>
|
<th>Price</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>'''
|
<tbody>'''
|
||||||
|
|
||||||
for asset, price in prices.items():
|
for asset, price in prices.items():
|
||||||
html += f'''<tr>
|
html += f'''<tr>
|
||||||
<td>{asset}</td>
|
<td>{asset}</td>
|
||||||
<td class="price-positive">${price:.2f}</td>
|
<td class="price-positive">${price:.2f}</td>
|
||||||
</tr>'''
|
</tr>'''
|
||||||
|
|
||||||
html += '''</tbody>
|
html += '''</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="section-title">Holdings</div>
|
<div class="section-title">Holdings</div>
|
||||||
<div class="table-wrapper">
|
<div class="table-wrapper">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Asset</th>
|
<th>Asset</th>
|
||||||
<th>Free</th>
|
<th>Free</th>
|
||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>'''
|
<tbody>'''
|
||||||
|
|
||||||
tracked = ['BTC', 'ETH', 'SOL', 'BNB', 'XRP', 'USDT', 'USDC']
|
tracked = ['BTC', 'ETH', 'SOL', 'BNB', 'XRP', 'USDT', 'USDC']
|
||||||
balance = state.get('balance', {})
|
balance = state.get('balance', {})
|
||||||
|
|
@ -543,33 +495,19 @@ tbody tr:active {{
|
||||||
price = prices.get(asset, 0)
|
price = prices.get(asset, 0)
|
||||||
value = data['total'] * price
|
value = data['total'] * price
|
||||||
html += f'''<tr>
|
html += f'''<tr>
|
||||||
<td>{asset}</td>
|
<td>{asset}</td>
|
||||||
<td>{data['free']:.4f}</td>
|
<td>{data['free']:.4f}</td>
|
||||||
<td>{data['total']:.4f}</td>
|
<td>{data['total']:.4f}</td>
|
||||||
<td class="price-positive">${value:.2f}</td>
|
<td class="price-positive">${value:.2f}</td>
|
||||||
</tr>'''
|
</tr>'''
|
||||||
|
|
||||||
html += '''</tbody>
|
html += '''</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function toggleSidebar() {{
|
|
||||||
const sidebar = document.getElementById('sidebar');
|
|
||||||
sidebar.classList.toggle('active');
|
|
||||||
}}
|
|
||||||
|
|
||||||
document.addEventListener('click', function(event) {{
|
|
||||||
const sidebar = document.getElementById('sidebar');
|
|
||||||
const toggle = document.querySelector('.menu-toggle');
|
|
||||||
if (!sidebar.contains(event.target) && !toggle.contains(event.target)) {{
|
|
||||||
sidebar.classList.remove('active');
|
|
||||||
}}
|
|
||||||
}});
|
|
||||||
|
|
||||||
// Refresh prices every 5 seconds
|
// Refresh prices every 5 seconds
|
||||||
setInterval(function() {{
|
setInterval(function() {{
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue