From daba14856278f1a4b8e6dc44d1e81d639039c586 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Thu, 4 Jun 2026 12:16:51 -0400 Subject: [PATCH] 06/04 Improve Dashboard exchange rate card UI/UX --- app/templates/dashboard/index.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/templates/dashboard/index.html b/app/templates/dashboard/index.html index 9500640..b7ee510 100644 --- a/app/templates/dashboard/index.html +++ b/app/templates/dashboard/index.html @@ -3,7 +3,7 @@ {% block page_title %}Dashboard{% endblock %} {% block extra_css %} -.fx-card { background: #0f172a; border-color: #1e293b; color: #f1f5f9; cursor: pointer; transition: all .2s; } +.fx-card { background: #eff6ff; border-color: #bfdbfe; color: #0f172a; cursor: pointer; transition: all .2s; } .fx-card:hover { border-color: #3b82f6 !important; } .period-btn.active { background: #3b82f6; color: #fff; border-color: #3b82f6; } @keyframes spin { to { transform: rotate(360deg); } } @@ -122,16 +122,16 @@
-
USD → VND
-
₫{{ "{:,.0f}".format(fx.rate) }}
-
+
USD → VND
+
₫{{ "{:,.0f}".format(fx.rate) }}
+
1 USD · {{ fx.date.strftime('%b %d, %Y') }} - · {{ fx.source }} - {% if fx.is_stale %} ⚠ stale{% endif %} + · {{ fx.source }} + {% if fx.is_stale %} ⚠ stale{% endif %}
@@ -140,13 +140,13 @@
{% else %} -
+
-
USD → VND
-
Rate unavailable
+
USD → VND
+
Rate unavailable
-
@@ -361,9 +361,9 @@ function toggleFxChart(){ const h = {{ fx_history_data | tojson }}; fxChart = new Chart(document.getElementById('fxChart').getContext('2d'), { type:'line', - data:{ labels:h.dates, datasets:[{ data:h.rates, borderColor:'#3b82f6', borderWidth:1.5, pointRadius:0, tension:.3, fill:false }] }, + data:{ labels:h.dates, datasets:[{ data:h.rates, borderColor:'#3b82f6', backgroundColor:'#dbeafe55', borderWidth:1.5, pointRadius:0, tension:.3, fill:true }] }, options:{ responsive:true, maintainAspectRatio:false, plugins:{ legend:{ display:false } }, - scales:{ x:{ display:false }, y:{ grid:{ color:'#1e293b' }, ticks:{ color:'#64748b', font:{ size:9 }, callback: v=>'₫'+(v/1000).toFixed(0)+'K' } } } } + scales:{ x:{ display:false }, y:{ grid:{ color:'#dbeafe' }, ticks:{ color:'#64748b', font:{ size:9 }, callback: v=>'₫'+(v/1000).toFixed(0)+'K' } } } } }); } }