]>
Commit | Line | Data |
---|---|---|
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 | 46 | menu { |
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; | |
cd5dc718 | 195 | margin-top: 3px; |
e5b432e0 | 196 | } |
b33f657c C |
197 | } |
198 | } | |
51a83970 K |
199 | |
200 | my-notification { | |
201 | margin-left: auto; | |
202 | margin-right: 15px; | |
203 | } | |
b33f657c C |
204 | } |
205 | ||
17119e4a C |
206 | .logged-in-menu { |
207 | display: flex; | |
208 | flex-direction: column; | |
209 | align-items: flex-start; | |
210 | border-top: 1px solid var(--greyForegroundColor); | |
211 | ||
212 | a { | |
213 | @include menu-link; | |
214 | @include disable-default-a-behaviour; | |
b33f657c | 215 | |
17119e4a C |
216 | $icon-size: 13px; |
217 | $additional-margin: ($menu-link-icon-size - $icon-size) / 2; | |
9bce8112 | 218 | |
17119e4a | 219 | font-size: 14px; |
9bce8112 | 220 | width: 100%; |
17119e4a | 221 | min-height: 35px; |
c30745f3 | 222 | |
17119e4a C |
223 | my-global-icon { |
224 | width: $icon-size; | |
225 | height: $icon-size; | |
b33f657c | 226 | |
17119e4a C |
227 | // Keep aligned with other icons |
228 | margin-left: $additional-margin; | |
229 | ||
230 | &[iconName="channel"] { | |
231 | margin-top: -2px; | |
232 | } | |
233 | } | |
234 | ||
235 | &.active, | |
236 | &:hover, | |
237 | &:focus-visible { | |
238 | my-global-icon { | |
a742b4b0 | 239 | @include apply-svg-color(var(--menuForegroundColor)); |
17119e4a C |
240 | } |
241 | } | |
242 | ||
243 | &.active { | |
244 | $border-left-width: 4px; | |
9bce8112 | 245 | |
17119e4a C |
246 | font-weight: $font-semibold; |
247 | border-left: $border-left-width solid var(--mainColor); | |
b33f657c | 248 | |
17119e4a C |
249 | my-global-icon { |
250 | margin-left: $additional-margin - $border-left-width; | |
251 | } | |
b33f657c C |
252 | } |
253 | } | |
254 | } | |
17119e4a C |
255 | } |
256 | ||
257 | .login-buttons-block { | |
258 | margin: 30px 25px 35px 25px; | |
259 | ||
260 | .login-button { | |
261 | @include peertube-button-link; | |
262 | @include orange-button; | |
263 | ||
264 | display: block; | |
265 | width: 100%; | |
266 | margin-bottom: 10px; | |
267 | } | |
268 | ||
269 | .create-account-button { | |
270 | @include peertube-button-link; | |
271 | ||
272 | display: block; | |
273 | width: 100%; | |
274 | ||
275 | color: #fff; | |
276 | background-color: rgba(255, 255, 255, 0.25); | |
277 | ||
278 | &:hover { | |
279 | background-color: rgba(255, 255, 255, 0.28); | |
280 | } | |
281 | } | |
282 | } | |
283 | ||
f0048d5e | 284 | .in-my-library, |
17119e4a C |
285 | .on-instance, |
286 | .footer-block { | |
287 | margin-bottom: 15px; | |
b33f657c C |
288 | |
289 | .block-title { | |
290 | text-transform: uppercase; | |
291 | font-weight: $font-bold; // Bold | |
292 | font-size: 13px; | |
293 | margin-bottom: 25px; | |
829be6e8 | 294 | margin-left: 26px; |
b33f657c | 295 | |
17119e4a | 296 | @include ellipsis; |
b33f657c | 297 | |
17119e4a C |
298 | margin-right: 30px; |
299 | } | |
0727cab0 | 300 | |
17119e4a C |
301 | a { |
302 | @include menu-link; | |
303 | @include disable-default-a-behaviour; | |
b33f657c | 304 | |
17119e4a | 305 | min-height: 40px; |
b33f657c | 306 | |
17119e4a C |
307 | my-global-icon { |
308 | &[iconName="playlists"] { | |
309 | height: 24px; | |
310 | width: 24px; | |
b33f657c | 311 | |
17119e4a | 312 | margin-right: 16px; |
a55052c9 | 313 | } |
36f9424f | 314 | |
17119e4a C |
315 | &[iconName="videos"] { |
316 | position: relative; | |
317 | right: -1px; | |
b33f657c C |
318 | } |
319 | } | |
320 | } | |
17119e4a C |
321 | } |
322 | ||
323 | .footer { | |
324 | width: $menu-width; | |
325 | padding-bottom: 15px; | |
326 | ||
327 | .bottom-links { | |
328 | display: flex; | |
329 | flex-direction: column; | |
330 | padding: 0 $menu-lateral-padding; | |
331 | } | |
8afc19a6 | 332 | |
17119e4a | 333 | $footer-links-base-opacity: .8; |
8afc19a6 | 334 | |
17119e4a C |
335 | .footer-links { |
336 | &, > div { | |
14f83c68 | 337 | display: flex; |
17119e4a | 338 | flex-wrap: wrap; |
d3217560 | 339 | } |
8afc19a6 | 340 | |
17119e4a C |
341 | a, span[role=button] { |
342 | display: inline-block; | |
343 | text-decoration: none; | |
a742b4b0 | 344 | color: pvar(--menuForegroundColor); |
17119e4a C |
345 | opacity: $footer-links-base-opacity; |
346 | white-space: nowrap; | |
347 | font-size: 90%; | |
348 | font-weight: 500; | |
349 | line-height: 1.4rem; | |
350 | margin-right: 8px; | |
351 | ||
352 | &.inline-global-icon { | |
353 | display: inline-flex; | |
354 | align-items: center; | |
355 | white-space: nowrap; | |
356 | height: 1.4rem; | |
8afc19a6 | 357 | |
17119e4a | 358 | my-global-icon { |
a742b4b0 | 359 | @include apply-svg-color(pvar(--menuForegroundColor)); |
8afc19a6 | 360 | |
17119e4a C |
361 | display: flex; |
362 | width: auto; | |
363 | height: 90%; | |
364 | margin-right: .2rem; | |
8afc19a6 | 365 | } |
d3217560 RK |
366 | } |
367 | } | |
17119e4a | 368 | } |
8afc19a6 | 369 | |
17119e4a C |
370 | .footer-copyleft small a { |
371 | @include disable-default-a-behaviour; | |
4a216666 | 372 | |
a742b4b0 | 373 | color: pvar(--menuForegroundColor); |
17119e4a | 374 | opacity: $footer-links-base-opacity - .2; |
d3217560 RK |
375 | } |
376 | } | |
4a216666 | 377 | |
2856af48 C |
378 | .dropdown { |
379 | z-index: #{z('menu') + 1} !important; | |
380 | } | |
381 | ||
d3217560 RK |
382 | .dropdown-menu { |
383 | width: calc(100% + 40px); | |
384 | } | |
9a0fc840 | 385 | |
d3217560 RK |
386 | .dropdown-item { |
387 | @include dropdown-with-icon-item; | |
9a0fc840 | 388 | |
d3217560 RK |
389 | cursor: pointer; |
390 | display: flex; | |
391 | align-items: center; | |
392 | ||
393 | i.glyphicon-menu-right { | |
394 | opacity: .4; | |
395 | } | |
396 | ||
397 | my-global-icon { | |
398 | &[iconName="cog"], | |
399 | &[iconName="sign-out"] { | |
400 | position: relative; | |
401 | right: -2px; | |
402 | height: 20px; | |
403 | width: 20px; | |
404 | } | |
405 | } | |
406 | ||
407 | my-global-icon.not-displayed { | |
408 | display: none; | |
409 | } | |
410 | ||
411 | &:hover { | |
412 | my-global-icon.hover-display-toggle.not-displayed { | |
413 | display: inherit; | |
414 | } | |
415 | my-global-icon.hover-display-toggle { | |
416 | display: none; | |
8afc19a6 | 417 | } |
51a83970 K |
418 | |
419 | &.settings-sensitive { | |
420 | my-global-icon ::ng-deep svg { | |
421 | margin-top: 2px !important; | |
422 | } | |
423 | } | |
8afc19a6 | 424 | } |
b33f657c | 425 | } |
46ae6f67 | 426 | |
d3217560 RK |
427 | .more-settings { |
428 | text-transform: uppercase; | |
429 | font-size: 80%; | |
430 | color: #6c757d; | |
431 | } | |
432 | ||
fdebd9a3 | 433 | @media screen and (max-width: $mobile-view) { |
46ae6f67 C |
434 | .menu-wrapper { |
435 | width: 100% !important; | |
c06be129 | 436 | |
c06be129 C |
437 | menu { |
438 | overflow-y: auto; | |
439 | } | |
440 | } | |
c0022613 C |
441 | |
442 | .top-menu, .footer { | |
443 | width: 100% !important; | |
444 | } | |
51a83970 K |
445 | |
446 | .dropdown-menu { | |
447 | width: calc(100vw - 30px); | |
448 | } | |
449 | ||
450 | .dropdown-item:hover, .dropdown-item:active { | |
451 | &.settings-sensitive my-global-icon ::ng-deep svg { | |
452 | margin-top: 0px !important; | |
453 | } | |
454 | } | |
c06be129 | 455 | } |