|
3 | 3 | display: flex; |
4 | 4 | min-height: 100vh; |
5 | 5 | background-color: var(--ifm-background-color); |
| 6 | + position: relative; |
6 | 7 | } |
7 | 8 |
|
8 | 9 | /* Sidebar Styles */ |
9 | 10 | .dashboard-sidebar { |
10 | | - width: 250px; |
| 11 | + width: 200px; |
11 | 12 | background: var(--ifm-card-background-color); |
12 | 13 | border-right: 1px solid var(--ifm-toc-border-color); |
13 | 14 | padding: 1.5rem 0; |
14 | 15 | position: fixed; |
15 | 16 | height: 100vh; |
16 | 17 | overflow-y: auto; |
17 | | - z-index: 100; |
| 18 | + transition: width 0.3s ease, transform 0.3s ease; |
| 19 | + /* z-index: 100; */ |
| 20 | + display: flex; |
| 21 | + flex-direction: column; |
| 22 | +} |
| 23 | + |
| 24 | +.sidebar-header { |
| 25 | + padding: 0 1.5rem; |
| 26 | + margin-bottom: 1.5rem; |
| 27 | + position: relative; |
| 28 | + display: flex; |
| 29 | + justify-content: space-between; |
| 30 | + align-items: center; |
18 | 31 | } |
19 | 32 |
|
20 | 33 | .sidebar-logo { |
21 | | - padding: 0 1.5rem 1.5rem; |
| 34 | + padding: 0 0 1.5rem 0; |
22 | 35 | border-bottom: 1px solid var(--ifm-toc-border-color); |
23 | | - margin-bottom: 1.5rem; |
| 36 | + margin-bottom: 0; |
| 37 | + flex-grow: 1; |
| 38 | + transition: opacity 0.2s ease; |
24 | 39 | } |
25 | 40 |
|
26 | 41 | .sidebar-logo h2 { |
|
32 | 47 | list-style: none; |
33 | 48 | padding: 0; |
34 | 49 | margin: 0; |
| 50 | + flex-grow: 1; |
| 51 | +} |
| 52 | + |
| 53 | +.sidebar-footer { |
| 54 | + padding: 1rem 1.5rem 0; |
| 55 | + margin-top: auto; |
| 56 | + border-top: 1px solid var(--ifm-toc-border-color); |
| 57 | + padding-top: 1.5rem; |
| 58 | + transition: opacity 0.2s ease; |
35 | 59 | } |
36 | 60 |
|
37 | 61 | .nav-item { |
|
41 | 65 | cursor: pointer; |
42 | 66 | transition: all 0.2s ease; |
43 | 67 | color: var(--ifm-font-color-base); |
| 68 | + white-space: nowrap; |
44 | 69 | } |
45 | 70 |
|
46 | 71 | .nav-item:hover { |
|
60 | 85 | font-size: 1.25rem; |
61 | 86 | } |
62 | 87 |
|
| 88 | +/* Toggle Button */ |
| 89 | +.sidebar-toggle { |
| 90 | + background: var(--ifm-color-primary); |
| 91 | + color: white; |
| 92 | + border: none; |
| 93 | + border-radius: 50%; |
| 94 | + width: 30px; |
| 95 | + height: 30px; |
| 96 | + display: flex; |
| 97 | + align-items: center; |
| 98 | + justify-content: center; |
| 99 | + cursor: pointer; |
| 100 | + margin-left: 1rem; |
| 101 | + flex-shrink: 0; |
| 102 | + transition: background-color 0.2s ease; |
| 103 | +} |
| 104 | + |
| 105 | +.sidebar-toggle:hover { |
| 106 | + background: var(--ifm-color-primary-dark); |
| 107 | +} |
| 108 | + |
| 109 | +.sidebar-toggle.bottom-toggle { |
| 110 | + margin: 1.5rem auto 0; |
| 111 | + display: block; |
| 112 | +} |
| 113 | + |
| 114 | +/* Collapsed Sidebar */ |
| 115 | +.dashboard-sidebar.collapsed { |
| 116 | + width: 70px; |
| 117 | + overflow: hidden; |
| 118 | +} |
| 119 | + |
| 120 | +.dashboard-sidebar.collapsed .sidebar-logo h2, |
| 121 | +.dashboard-sidebar.collapsed .nav-text, |
| 122 | +.dashboard-sidebar.collapsed .sidebar-footer { |
| 123 | + opacity: 0; |
| 124 | + pointer-events: none; |
| 125 | + white-space: nowrap; |
| 126 | +} |
| 127 | + |
| 128 | +.dashboard-sidebar.collapsed .sidebar-header { |
| 129 | + justify-content: center; |
| 130 | + padding: 0 1rem; |
| 131 | +} |
| 132 | + |
| 133 | +.dashboard-sidebar.collapsed .sidebar-toggle { |
| 134 | + position: absolute; |
| 135 | + right: 5px; |
| 136 | + top: 10px; |
| 137 | +} |
| 138 | + |
| 139 | +.dashboard-sidebar.collapsed .sidebar-toggle.bottom-toggle { |
| 140 | + position: static; |
| 141 | + margin: 1rem auto 0; |
| 142 | +} |
| 143 | + |
| 144 | +.dashboard-sidebar.collapsed .nav-item { |
| 145 | + padding: 0.75rem 1rem; |
| 146 | + justify-content: center; |
| 147 | +} |
| 148 | + |
| 149 | +.dashboard-sidebar.collapsed .nav-icon { |
| 150 | + margin-right: 0; |
| 151 | + font-size: 1.5rem; |
| 152 | +} |
| 153 | + |
63 | 154 | /* Main Content */ |
64 | 155 | .dashboard-main { |
65 | 156 | flex: 1; |
66 | 157 | margin-left: 250px; /* Match sidebar width */ |
67 | 158 | padding: 2rem; |
68 | 159 | max-width: calc(100% - 250px); |
| 160 | + transition: margin-left 0.3s ease, max-width 0.3s ease; |
| 161 | +} |
| 162 | + |
| 163 | +.dashboard-main.sidebar-collapsed { |
| 164 | + margin-left: 70px; |
| 165 | + max-width: calc(100% - 70px); |
69 | 166 | } |
70 | 167 |
|
71 | 168 | .dashboard-main.discuss-view { |
72 | 169 | max-width: 100%; |
73 | 170 | } |
74 | 171 |
|
| 172 | +.dashboard-main.sidebar-collapsed.discuss-view { |
| 173 | + margin-left: 0; |
| 174 | + max-width: 100%; |
| 175 | +} |
| 176 | + |
75 | 177 | /* Discussion Section */ |
76 | 178 | .discussion-container { |
77 | 179 | max-width: 800px; |
|
271 | 373 | align-items: center; |
272 | 374 | } |
273 | 375 |
|
| 376 | +/* Center images in leaderboard when sidebar is collapsed */ |
| 377 | +.dashboard-main.sidebar-collapsed .leaderboard-card { |
| 378 | + grid-template-columns: 1fr; |
| 379 | + text-align: center; |
| 380 | + padding: 1.5rem; |
| 381 | +} |
| 382 | + |
| 383 | +.dashboard-main.sidebar-collapsed .leaderboard-avatar { |
| 384 | + margin: 0 auto; |
| 385 | +} |
| 386 | + |
| 387 | +.dashboard-main.sidebar-collapsed .leaderboard-info { |
| 388 | + grid-column: 1 / -1; |
| 389 | +} |
| 390 | + |
| 391 | +.dashboard-main.sidebar-collapsed .leaderboard-actions { |
| 392 | + grid-column: 1 / -1; |
| 393 | + justify-self: center; |
| 394 | +} |
| 395 | + |
274 | 396 | .leaderboard-card:hover { |
275 | 397 | transform: translateY(-2px); |
276 | 398 | box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); |
|
0 commit comments