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