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