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