feat: кликабельные карточки дашборда с hover-эффектом

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-08 22:46:12 +10:00
co-authored by Claude Opus 4.6
parent f3441f4818
commit 69fcf1b8d0
2 changed files with 17 additions and 8 deletions
@@ -19,6 +19,15 @@
padding: 1rem;
border-radius: 8px;
background: var(--pico-card-background-color);
text-decoration: none;
color: inherit;
cursor: pointer;
transition: transform 0.15s, box-shadow 0.15s;
display: block;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.stat-value { font-size: 1.8em; font-weight: bold; }
.stat-label { font-size: 0.85em; opacity: 0.7; }
@@ -6,24 +6,24 @@
<!-- Stats cards -->
<div class="grid-stats">
<div class="stat-card">
<a href="/" class="stat-card">
<div class="stat-value">${{ "%.2f"|format(total_equity) }}</div>
<div class="stat-label">Total Equity</div>
</div>
<div class="stat-card">
</a>
<a href="/history" class="stat-card">
<div class="stat-value {{ 'positive' if total_pnl >= 0 else 'negative' }}">
${{ "%+.2f"|format(total_pnl) }}
</div>
<div class="stat-label">PnL ({{ "%+.1f"|format(total_ret) }}%)</div>
</div>
<div class="stat-card">
</a>
<a href="/positions" class="stat-card">
<div class="stat-value">{{ positions|length }}</div>
<div class="stat-label">Open Positions</div>
</div>
<div class="stat-card">
</a>
<a href="/history" class="stat-card">
<div class="stat-value">{{ assets|map(attribute='trades_count')|sum }}</div>
<div class="stat-label">Total Trades</div>
</div>
</a>
</div>
<!-- Equity chart -->