|
2 | 2 | @import 'theme'; |
3 | 3 |
|
4 | 4 | .sidebar-navigation { |
5 | | - width: $sidebar-width; |
6 | | - padding: $spacing-lg; |
| 5 | + width: 100%; |
| 6 | + max-width: 100%; |
| 7 | + padding: 1.125rem; |
7 | 8 | background: var(--color-bg-secondary); |
8 | 9 | border-right: 1px solid var(--color-border); |
9 | | - height: calc(100vh - 80px); |
| 10 | + height: 100%; |
10 | 11 | overflow-y: auto; |
11 | | - position: sticky; |
12 | | - top: 80px; |
| 12 | + overflow-x: hidden; |
| 13 | + box-sizing: border-box; |
13 | 14 | @include theme-transition-all; |
14 | 15 |
|
15 | 16 | h2 { |
16 | | - font-size: $font-size-h3; |
17 | | - margin-bottom: $spacing-md; |
| 17 | + font-size: 1.1rem; |
| 18 | + margin-bottom: $spacing-sm; |
18 | 19 | color: var(--color-text-primary); |
19 | 20 | @include theme-transition(color); |
20 | 21 | } |
|
25 | 26 | margin: 0; |
26 | 27 |
|
27 | 28 | > li { |
28 | | - margin-bottom: $spacing-lg; |
| 29 | + margin-bottom: 0.875rem; |
29 | 30 |
|
30 | | - > a { |
31 | | - font-weight: bold; |
32 | | - color: var(--color-primary); |
33 | | - text-decoration: none; |
34 | | - display: block; |
35 | | - padding: $spacing-sm; |
36 | | - border-radius: 4px; |
37 | | - @include theme-transition-all; |
| 31 | + .module-header { |
| 32 | + display: flex; |
| 33 | + align-items: center; |
| 34 | + gap: 0.375rem; |
38 | 35 |
|
39 | | - &:hover { |
40 | | - background: var(--color-primary-light); |
| 36 | + .toggle-btn { |
| 37 | + background: none; |
| 38 | + border: none; |
| 39 | + cursor: pointer; |
| 40 | + padding: 0.125rem 0.25rem; |
| 41 | + color: var(--color-text-secondary); |
| 42 | + font-size: 0.7rem; |
| 43 | + line-height: 1; |
| 44 | + display: flex; |
| 45 | + align-items: center; |
| 46 | + justify-content: center; |
| 47 | + min-width: 1rem; |
| 48 | + @include theme-transition-all; |
| 49 | + |
| 50 | + &:hover { |
| 51 | + color: var(--color-primary); |
| 52 | + } |
| 53 | + |
| 54 | + .toggle-icon { |
| 55 | + display: inline-block; |
| 56 | + transition: transform 0.2s ease; |
| 57 | + } |
| 58 | + |
| 59 | + &[aria-expanded="false"] .toggle-icon { |
| 60 | + transform: rotate(-90deg); |
| 61 | + } |
| 62 | + } |
| 63 | + |
| 64 | + > a { |
| 65 | + font-weight: bold; |
| 66 | + color: var(--color-primary); |
| 67 | + text-decoration: none; |
| 68 | + flex: 1; |
| 69 | + padding: 0.375rem $spacing-sm; |
| 70 | + border-radius: 4px; |
| 71 | + font-size: 0.95rem; |
| 72 | + @include theme-transition-all; |
| 73 | + |
| 74 | + &:hover { |
| 75 | + background: var(--color-primary-light); |
| 76 | + } |
41 | 77 | } |
42 | 78 | } |
43 | 79 |
|
44 | 80 | .lessons-list { |
45 | 81 | list-style: none; |
46 | | - padding-left: $spacing-md; |
47 | | - margin-top: $spacing-sm; |
| 82 | + padding-left: 0.875rem; |
| 83 | + margin-top: $spacing-xs; |
| 84 | + transition: max-height 0.3s ease, opacity 0.2s ease; |
| 85 | + overflow: hidden; |
| 86 | + |
| 87 | + &.collapsed { |
| 88 | + max-height: 0; |
| 89 | + opacity: 0; |
| 90 | + margin-top: 0; |
| 91 | + } |
48 | 92 |
|
49 | 93 | li { |
50 | | - margin-bottom: $spacing-xs; |
| 94 | + margin-bottom: 0.125rem; |
| 95 | + |
| 96 | + .lesson-header { |
| 97 | + display: flex; |
| 98 | + align-items: center; |
| 99 | + gap: 0.375rem; |
| 100 | + |
| 101 | + .toggle-btn { |
| 102 | + background: none; |
| 103 | + border: none; |
| 104 | + cursor: pointer; |
| 105 | + padding: 0.125rem 0.25rem; |
| 106 | + color: var(--color-text-secondary); |
| 107 | + font-size: 0.65rem; |
| 108 | + line-height: 1; |
| 109 | + display: flex; |
| 110 | + align-items: center; |
| 111 | + justify-content: center; |
| 112 | + min-width: 0.875rem; |
| 113 | + @include theme-transition-all; |
| 114 | + |
| 115 | + &:hover { |
| 116 | + color: var(--color-primary); |
| 117 | + } |
| 118 | + |
| 119 | + .toggle-icon { |
| 120 | + display: inline-block; |
| 121 | + transition: transform 0.2s ease; |
| 122 | + } |
| 123 | + |
| 124 | + &[aria-expanded="false"] .toggle-icon { |
| 125 | + transform: rotate(-90deg); |
| 126 | + } |
| 127 | + } |
| 128 | + |
| 129 | + > a { |
| 130 | + color: var(--color-text-primary); |
| 131 | + text-decoration: none; |
| 132 | + flex: 1; |
| 133 | + padding: 0.375rem 0.5rem; |
| 134 | + border-radius: 4px; |
| 135 | + font-size: 0.875rem; |
| 136 | + @include theme-transition-all; |
| 137 | + |
| 138 | + &:hover { |
| 139 | + background: var(--color-primary-light); |
| 140 | + } |
| 141 | + } |
| 142 | + } |
51 | 143 |
|
52 | | - a { |
53 | | - color: var(--color-text-primary); |
54 | | - text-decoration: none; |
55 | | - display: block; |
56 | | - padding: $spacing-xs $spacing-sm; |
57 | | - border-radius: 4px; |
58 | | - font-size: $font-size-small; |
59 | | - @include theme-transition-all; |
| 144 | + .exercises-list { |
| 145 | + list-style: none; |
| 146 | + padding-left: 0.875rem; |
| 147 | + margin-top: 0.125rem; |
| 148 | + max-height: 1000px; |
| 149 | + transition: max-height 0.3s ease, opacity 0.2s ease; |
| 150 | + overflow: hidden; |
| 151 | + |
| 152 | + &.collapsed { |
| 153 | + max-height: 0; |
| 154 | + opacity: 0; |
| 155 | + margin-top: 0; |
| 156 | + } |
60 | 157 |
|
61 | | - &:hover { |
62 | | - background: var(--color-primary-light); |
| 158 | + li { |
| 159 | + margin-bottom: 0.125rem; |
| 160 | + |
| 161 | + &.lesson-link-item { |
| 162 | + margin-bottom: 0.25rem; |
| 163 | + padding-bottom: 0.25rem; |
| 164 | + border-bottom: 1px solid var(--color-border); |
| 165 | + |
| 166 | + a { |
| 167 | + color: var(--color-text-primary); |
| 168 | + font-size: 0.85rem; |
| 169 | + font-weight: 500; |
| 170 | + opacity: 1; |
| 171 | + } |
| 172 | + } |
| 173 | + |
| 174 | + a { |
| 175 | + color: var(--color-text-secondary); |
| 176 | + text-decoration: none; |
| 177 | + display: block; |
| 178 | + padding: 0.3rem 0.5rem; |
| 179 | + border-radius: 4px; |
| 180 | + font-size: 0.8rem; |
| 181 | + opacity: 0.85; |
| 182 | + @include theme-transition-all; |
| 183 | + |
| 184 | + &:hover { |
| 185 | + background: var(--color-primary-light); |
| 186 | + opacity: 1; |
| 187 | + } |
| 188 | + |
| 189 | + &.active { |
| 190 | + background: var(--color-primary-light); |
| 191 | + color: var(--color-primary); |
| 192 | + opacity: 1; |
| 193 | + font-weight: 500; |
| 194 | + } |
| 195 | + } |
63 | 196 | } |
64 | 197 | } |
65 | 198 | } |
|
0 commit comments