feat: add multi-asset sidebar (BTC, USD, XAU) with asset switching
- Added sidebar navigation with 3 tabs: Bitcoin, Dólar, Ouro - Added switchAsset() function to switch between assets - Updated CSS with sidebar layout (fixed 200px sidebar) - Updated script.js with asset state management - Sync sidebar clock and status with main header - BTC remains default active tab
This commit is contained in:
+83
-6
@@ -15,27 +15,104 @@
|
||||
--shadow: 0 8px 32px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
/* ── Reset & Base ───────────────────────────────────────── */
|
||||
/* ── Reset & Base ───────────────────────────────────── */
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
/* ── Sidebar Layout ──────────────────────────────────── */
|
||||
body {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
font-family: 'Exo 2', 'Noto Sans JP', sans-serif;
|
||||
background: var(--bg-dark);
|
||||
color: var(--text-primary);
|
||||
min-height: 100vh;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* ── Dashboard Layout ───────────────────────────────────── */
|
||||
.dashboard {
|
||||
/* ── Sidebar ─────────────────────────────────────────── */
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
min-height: 100vh;
|
||||
background: var(--bg-card);
|
||||
border-right: 1px solid rgba(79,195,247,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px 0;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
.sidebar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 0 16px 20px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.sidebar-logo-icon { font-size: 1.8rem; }
|
||||
.sidebar-logo-text { font-size: 0.9rem; line-height: 1.2; color: var(--text-primary); }
|
||||
.sidebar-logo-text strong { color: var(--accent-blue); }
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 0 10px;
|
||||
flex: 1;
|
||||
}
|
||||
.sidebar-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 14px 8px;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
text-align: center;
|
||||
}
|
||||
.sidebar-btn:hover {
|
||||
background: var(--bg-card-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.sidebar-btn.active {
|
||||
background: rgba(79,195,247,0.1);
|
||||
color: var(--accent-blue);
|
||||
border: 1px solid rgba(79,195,247,0.2);
|
||||
}
|
||||
.sidebar-icon { font-size: 1.6rem; }
|
||||
.sidebar-label { font-size: 0.8rem; font-weight: 600; }
|
||||
.sidebar-pair { font-size: 0.65rem; opacity: 0.6; }
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 16px;
|
||||
border-top: 1px solid rgba(255,255,255,0.05);
|
||||
text-align: center;
|
||||
}
|
||||
.sidebar-clock { font-size: 1.1rem; color: var(--accent-blue); margin-bottom: 8px; }
|
||||
.sidebar-status { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.75rem; color: var(--text-secondary); }
|
||||
|
||||
/* ── Main Content ────────────────────────────────────── */
|
||||
.main-content {
|
||||
margin-left: 200px;
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
max-width: calc(100vw - 200px);
|
||||
}
|
||||
.main-content .dashboard {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
/* ── Header ──────────────────────────────────────────────── */
|
||||
/* ── Header ──────────────────────────────────────────── */
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user