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