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