]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/menu/menu.component.scss
Some fixes for themes
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / menu.component.scss
CommitLineData
8cbc40b2
C
1@use 'sass:math';
2@use '_variables' as *;
3@use '_mixins' as *;
63c4db6d 4
17119e4a
C
5$menu-link-icon-size: 22px;
6$menu-link-icon-margin-right: 18px;
5d43dae3 7$footer-links-base-opacity: .8;
17119e4a 8
f1ac6348
C
9.menu-link {
10 @include disable-default-a-behaviour;
27bc9586
C
11 @include padding-left($menu-lateral-padding);
12 @include padding-right(20px);
f1ac6348 13
17119e4a
C
14 display: flex;
15 align-items: center;
27bc9586 16
17119e4a
C
17 color: pvar(--menuForegroundColor);
18 cursor: pointer;
19 font-size: 16px;
20 white-space: normal;
21 word-break: break-word;
17119e4a 22 transition: background-color .1s ease-in-out;
26171379 23 line-height: $line-height-normal;
17119e4a
C
24
25 &.active {
26 background-color: rgba(255, 255, 255, 0.15);
27 }
28
931d3430
C
29 &:hover,
30 &.focus-visible {
31 background-color: rgba(255, 255, 255, 0.1);
17119e4a
C
32 }
33
34 my-global-icon {
35 @include apply-svg-color(#808080);
27bc9586 36 @include margin-right($menu-link-icon-margin-right);
17119e4a
C
37
38 display: flex;
39 width: $menu-link-icon-size;
40 height: $menu-link-icon-size;
17119e4a
C
41 }
42}
43
8afc19a6
C
44.menu-wrapper {
45 position: fixed;
46 height: calc(100vh - #{$header-height});
47 padding: 0;
48 width: $menu-width;
36f2981f 49 z-index: z(menu);
e66883b3 50 scrollbar-color: pvar(--actionButtonColor) pvar(--menuBackgroundColor);
8afc19a6
C
51}
52
b33f657c 53menu {
ef80c66c
C
54 @include ellipsis;
55
e66883b3 56 background-color: pvar(--menuBackgroundColor);
e66883b3 57 color: pvar(--menuForegroundColor);
17119e4a 58
8afc19a6
C
59 display: flex;
60 flex-direction: column;
17119e4a 61 height: 100%;
46ae6f67 62 width: 100%;
17119e4a
C
63 margin: 0;
64 padding: 0;
8afc19a6 65
931d3430
C
66 &:focus,
67 &:hover {
a54991da
RK
68 overflow-y: auto;
69 }
70
ca4b1594
K
71 @media not all and (hover: hover) and (pointer: fine) {
72 overflow-y: auto;
73 }
74
17119e4a 75 &.is-logged-in {
a55052c9 76 .panel-block {
d3217560 77 margin-bottom: 20px;
a55052c9
C
78 }
79
80 .block-title {
81 margin-bottom: 15px;
82 }
83 }
17119e4a 84}
a55052c9 85
17119e4a
C
86.top-menu {
87 flex-grow: 1;
88 width: $menu-width;
89}
66467298 90
17119e4a
C
91.logged-in-block {
92 margin-bottom: 20px;
93 background-color: rgba(255, 255, 255, 0.15);
94
95 > div:first-child {
96 height: 80px;
b33f657c
C
97 display: flex;
98 align-items: center;
51a83970 99 justify-content: left;
5d43dae3
C
100 }
101}
ef80c66c 102
f1ac6348 103my-notification {
27bc9586
C
104 @include margin-left(auto);
105 @include margin-right(15px);
f1ac6348 106}
5d43dae3 107
f1ac6348 108.logged-in-more {
5d43dae3
C
109 @mixin display-hints($is-mobile: false) {
110 background-color: rgba(255, 255, 255, 0.15);
b33f657c 111
5d43dae3
C
112 @if $is-mobile {
113 .dropdown-toggle-indicator {
114 display: inherit !important;
115 }
27bc9586 116
c1936140
K
117 .dropdown-toggle {
118 max-width: 88% !important;
51a83970 119 }
5d43dae3
C
120 }
121 }
b33f657c 122
f1ac6348
C
123 $main-radius: 25px;
124
27bc9586
C
125 @include margin-left(13px);
126
f1ac6348 127 flex: 1;
f1ac6348
C
128 border-radius: $main-radius;
129 transition: all .1s ease-in-out;
130 cursor: pointer;
131 line-height: 1;
132
133 &.show {
931d3430 134 background-color: rgba(255, 255, 255, 0.2);
f1ac6348
C
135 box-shadow: inset 0 3px 5px rgba(0, 0, 0, .325);
136 }
137
5d43dae3
C
138 &:hover {
139 @include display-hints;
140 }
63347a0f 141
5d43dae3
C
142 /* smartphones and touchscreens */
143 @media (hover: none) and (pointer: coarse) {
144 @include display-hints($is-mobile: true);
51a83970 145
5d43dae3
C
146 /* fill space when on mobile */
147 max-width: calc(100% - 80px);
f1ac6348 148
5d43dae3
C
149 .dropdown-toggle {
150 max-width: 100%;
151 }
f1ac6348 152
5d43dae3
C
153 .logged-in-info {
154 max-width: calc(100% - 45px) !important;
155 }
5d43dae3 156 }
51a83970 157
5d43dae3
C
158 .dropdown-toggle-indicator {
159 position: relative;
160 width: 0;
161 display: none;
162
163 span {
164 position: absolute;
165 right: -35px;
166 top: -8px;
931d3430 167 color: #808080;
5d43dae3
C
168 width: $main-radius;
169 }
170 }
e5b432e0 171
5d43dae3
C
172 .dropdown-toggle {
173 &::after {
931d3430 174 border: 0;
5d43dae3
C
175 }
176 }
51a83970 177
5d43dae3
C
178 .dropdown-toggle:first-child {
179 display: flex;
180 align-items: center;
181 padding: 5px 7px;
182 border-radius: $main-radius;
183 }
f1ac6348 184}
51a83970 185
746018f6 186my-actor-avatar {
27bc9586 187 @include margin-right(10px);
5d43dae3 188}
51a83970 189
5d43dae3
C
190.logged-in-info {
191 max-width: 105px;
51a83970 192
5d43dae3 193 flex-grow: 1;
f1ac6348 194}
51a83970 195
f1ac6348
C
196.logged-in-display-name,
197.logged-in-username {
198 @include ellipsis;
199}
51a83970 200
f1ac6348 201.logged-in-display-name {
931d3430
C
202 @include disable-default-a-behaviour;
203
f1ac6348
C
204 font-size: 16px;
205 font-weight: $font-semibold;
206 color: pvar(--menuForegroundColor);
f1ac6348 207}
51a83970 208
f1ac6348
C
209.logged-in-username {
210 font-size: 13px;
211 color: #C6C6C6;
212 margin-top: 3px;
5d43dae3 213}
b33f657c 214
5d43dae3
C
215.logged-in-menu {
216 display: flex;
217 flex-direction: column;
218 align-items: flex-start;
219 border-top: 1px solid var(--greyForegroundColor);
220 line-height: $line-height-normal;
17119e4a 221
5d43dae3 222 a {
5d43dae3 223 $icon-size: 13px;
8cbc40b2 224 $additional-margin: math.div($menu-link-icon-size - $icon-size, 2);
9bce8112 225
5d43dae3
C
226 font-size: 14px;
227 width: 100%;
228 min-height: 35px;
c30745f3 229
5d43dae3 230 my-global-icon {
27bc9586
C
231 // Keep aligned with other icons
232 @include margin-left($additional-margin);
233
5d43dae3
C
234 width: $icon-size;
235 height: $icon-size;
5d43dae3 236 }
17119e4a 237
5d43dae3
C
238 &.active,
239 &:hover,
240 &:focus-visible {
241 my-global-icon {
242 @include apply-svg-color(var(--menuForegroundColor));
17119e4a 243 }
5d43dae3 244 }
17119e4a 245
5d43dae3
C
246 &.active {
247 $border-left-width: 4px;
9bce8112 248
5d43dae3
C
249 font-weight: $font-semibold;
250 border-left: $border-left-width solid var(--mainColor);
b33f657c 251
5d43dae3 252 my-global-icon {
27bc9586 253 @include margin-left($additional-margin - $border-left-width);
b33f657c
C
254 }
255 }
256 }
17119e4a
C
257}
258
259.login-buttons-block {
931d3430 260 margin: 30px 25px 35px;
17119e4a 261
f1ac6348 262 > a {
17119e4a
C
263 display: block;
264 width: 100%;
17119e4a 265
1025ce5d 266 &:not(:last-child) {
f1ac6348
C
267 margin-bottom: 10px;
268 }
269 }
270}
17119e4a 271
f1ac6348
C
272.create-account-button {
273 color: #fff;
274 background-color: rgba(255, 255, 255, 0.25);
17119e4a 275
f1ac6348
C
276 &:hover {
277 background-color: rgba(255, 255, 255, 0.28);
17119e4a
C
278 }
279}
280
8beea2d3 281.menu-block,
17119e4a
C
282.footer-block {
283 margin-bottom: 15px;
b33f657c
C
284
285 .block-title {
f1ac6348 286 @include ellipsis;
27bc9586
C
287 @include margin-left(26px);
288 @include margin-right(30px);
f1ac6348 289
b33f657c
C
290 text-transform: uppercase;
291 font-weight: $font-bold; // Bold
292 font-size: 13px;
293 margin-bottom: 25px;
17119e4a 294 }
0727cab0 295
17119e4a 296 a {
17119e4a 297 min-height: 40px;
b33f657c 298 }
17119e4a
C
299}
300
301.footer {
302 width: $menu-width;
303 padding-bottom: 15px;
f1ac6348 304}
17119e4a 305
f1ac6348
C
306.footer-bottom {
307 display: flex;
308 flex-direction: column;
309 padding: 0 $menu-lateral-padding;
5d43dae3 310}
8afc19a6 311
5d43dae3 312.footer-links {
931d3430
C
313 &,
314 > div {
5d43dae3
C
315 display: flex;
316 flex-wrap: wrap;
317 }
8afc19a6 318
f1ac6348
C
319 a,
320 span[role=button] {
27bc9586
C
321 @include margin-right(8px);
322
5d43dae3
C
323 display: inline-block;
324 text-decoration: none;
325 color: pvar(--menuForegroundColor);
326 opacity: $footer-links-base-opacity;
327 white-space: nowrap;
328 font-size: 90%;
329 font-weight: 500;
330 line-height: 1.4rem;
17119e4a 331 }
5d43dae3 332}
8afc19a6 333
5d43dae3
C
334.footer-copyleft small a {
335 @include disable-default-a-behaviour;
4a216666 336
5d43dae3
C
337 color: pvar(--menuForegroundColor);
338 opacity: $footer-links-base-opacity - .2;
d3217560 339}
4a216666 340
2856af48
C
341.dropdown {
342 z-index: #{z('menu') + 1} !important;
343}
344
d3217560
RK
345.dropdown-menu {
346 width: calc(100% + 40px);
347}
9a0fc840 348
d3217560
RK
349.dropdown-item {
350 @include dropdown-with-icon-item;
9a0fc840 351
d3217560
RK
352 cursor: pointer;
353 display: flex;
354 align-items: center;
355
356 i.glyphicon-menu-right {
357 opacity: .4;
358 }
359
d3217560 360 &:hover {
f1ac6348 361 .hover-display-toggle {
d3217560 362 display: none;
8afc19a6 363 }
51a83970 364
f1ac6348
C
365 .hover-display-toggle[hidden] {
366 display: inherit !important;
51a83970 367 }
8afc19a6 368 }
b33f657c 369}
46ae6f67 370
d3217560
RK
371.more-settings {
372 text-transform: uppercase;
373 font-size: 80%;
374 color: #6c757d;
375}
376
fdebd9a3 377@media screen and (max-width: $mobile-view) {
46ae6f67
C
378 .menu-wrapper {
379 width: 100% !important;
c06be129 380
c06be129
C
381 menu {
382 overflow-y: auto;
383 }
384 }
c0022613 385
f1ac6348
C
386 .top-menu,
387 .footer {
c0022613
C
388 width: 100% !important;
389 }
51a83970
K
390
391 .dropdown-menu {
392 width: calc(100vw - 30px);
393 }
394
f1ac6348
C
395 .dropdown-item:hover,
396 .dropdown-item:active {
51a83970 397 &.settings-sensitive my-global-icon ::ng-deep svg {
931d3430 398 margin-top: 0 !important;
51a83970
K
399 }
400 }
c06be129 401}
f1ac6348
C
402
403my-global-icon {
931d3430 404 &[iconName=playlists] {
27bc9586
C
405 @include margin-right(16px);
406
f1ac6348
C
407 height: 24px;
408 width: 24px;
f1ac6348
C
409 }
410
931d3430 411 &[iconName=videos] {
f1ac6348
C
412 position: relative;
413 right: -1px;
414 }
415
931d3430 416 &[iconName=channel] {
f1ac6348
C
417 margin-top: -2px;
418 }
419
931d3430 420 &[iconName='sign-out'] {
f1ac6348
C
421 position: relative;
422 right: -2px;
423 height: 20px;
424 width: 20px;
425 }
426}