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