]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/menu/menu.component.scss
Replace glyphicon chevron
[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;
19 font-size: 16px;
20 white-space: normal;
21 word-break: break-word;
17119e4a 22 transition: background-color .1s ease-in-out;
26171379 23 line-height: $line-height-normal;
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 }
27bc9586 117
c2faa073 118 > .dropdown-toggle {
c1936140 119 max-width: 88% !important;
51a83970 120 }
5d43dae3
C
121 }
122 }
b33f657c 123
27bc9586
C
124 @include margin-left(13px);
125
f1ac6348 126 flex: 1;
c2faa073 127 border-radius: 25px;
f1ac6348
C
128 transition: all .1s ease-in-out;
129 cursor: pointer;
130 line-height: 1;
131
132 &.show {
931d3430 133 background-color: rgba(255, 255, 255, 0.2);
f1ac6348
C
134 box-shadow: inset 0 3px 5px rgba(0, 0, 0, .325);
135 }
136
5d43dae3
C
137 &:hover {
138 @include display-hints;
139 }
63347a0f 140
5d43dae3
C
141 /* smartphones and touchscreens */
142 @media (hover: none) and (pointer: coarse) {
143 @include display-hints($is-mobile: true);
51a83970 144
5d43dae3
C
145 /* fill space when on mobile */
146 max-width: calc(100% - 80px);
f1ac6348 147
5d43dae3
C
148 .dropdown-toggle {
149 max-width: 100%;
150 }
f1ac6348 151
5d43dae3
C
152 .logged-in-info {
153 max-width: calc(100% - 45px) !important;
154 }
5d43dae3 155 }
51a83970 156
5d43dae3
C
157 .dropdown-toggle-indicator {
158 position: relative;
5d43dae3
C
159 display: none;
160
161 span {
162 position: absolute;
163 right: -35px;
164 top: -8px;
931d3430 165 color: #808080;
5d43dae3
C
166 }
167 }
e5b432e0 168
c2faa073
C
169 .dropdown-toggle::after {
170 border: 0;
5d43dae3 171 }
51a83970 172
c2faa073 173 > .dropdown-toggle:first-child {
5d43dae3
C
174 display: flex;
175 align-items: center;
176 padding: 5px 7px;
5d43dae3 177 }
f1ac6348 178}
51a83970 179
746018f6 180my-actor-avatar {
27bc9586 181 @include margin-right(10px);
5d43dae3 182}
51a83970 183
5d43dae3
C
184.logged-in-info {
185 max-width: 105px;
51a83970 186
5d43dae3 187 flex-grow: 1;
f1ac6348 188}
51a83970 189
f1ac6348
C
190.logged-in-display-name,
191.logged-in-username {
192 @include ellipsis;
193}
51a83970 194
f1ac6348 195.logged-in-display-name {
931d3430
C
196 @include disable-default-a-behaviour;
197
f1ac6348
C
198 font-size: 16px;
199 font-weight: $font-semibold;
200 color: pvar(--menuForegroundColor);
f1ac6348 201}
51a83970 202
f1ac6348
C
203.logged-in-username {
204 font-size: 13px;
205 color: #C6C6C6;
206 margin-top: 3px;
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 216 a {
5d43dae3 217 $icon-size: 13px;
8cbc40b2 218 $additional-margin: math.div($menu-link-icon-size - $icon-size, 2);
9bce8112 219
5d43dae3
C
220 font-size: 14px;
221 width: 100%;
222 min-height: 35px;
c30745f3 223
5d43dae3 224 my-global-icon {
27bc9586
C
225 // Keep aligned with other icons
226 @include margin-left($additional-margin);
227
5d43dae3
C
228 width: $icon-size;
229 height: $icon-size;
5d43dae3 230 }
17119e4a 231
5d43dae3
C
232 &.active,
233 &:hover,
234 &:focus-visible {
235 my-global-icon {
236 @include apply-svg-color(var(--menuForegroundColor));
17119e4a 237 }
5d43dae3 238 }
17119e4a 239
5d43dae3
C
240 &.active {
241 $border-left-width: 4px;
9bce8112 242
5d43dae3
C
243 font-weight: $font-semibold;
244 border-left: $border-left-width solid var(--mainColor);
b33f657c 245
5d43dae3 246 my-global-icon {
27bc9586 247 @include margin-left($additional-margin - $border-left-width);
b33f657c
C
248 }
249 }
250 }
17119e4a
C
251}
252
253.login-buttons-block {
931d3430 254 margin: 30px 25px 35px;
17119e4a 255
f1ac6348 256 > a {
17119e4a
C
257 display: block;
258 width: 100%;
17119e4a 259
1025ce5d 260 &:not(:last-child) {
f1ac6348
C
261 margin-bottom: 10px;
262 }
263 }
264}
17119e4a 265
f1ac6348
C
266.create-account-button {
267 color: #fff;
268 background-color: rgba(255, 255, 255, 0.25);
17119e4a 269
f1ac6348
C
270 &:hover {
271 background-color: rgba(255, 255, 255, 0.28);
17119e4a
C
272 }
273}
274
8beea2d3 275.menu-block,
17119e4a
C
276.footer-block {
277 margin-bottom: 15px;
b33f657c
C
278
279 .block-title {
f1ac6348 280 @include ellipsis;
27bc9586
C
281 @include margin-left(26px);
282 @include margin-right(30px);
f1ac6348 283
b33f657c
C
284 text-transform: uppercase;
285 font-weight: $font-bold; // Bold
286 font-size: 13px;
287 margin-bottom: 25px;
17119e4a 288 }
0727cab0 289
17119e4a 290 a {
17119e4a 291 min-height: 40px;
b33f657c 292 }
17119e4a
C
293}
294
295.footer {
296 width: $menu-width;
297 padding-bottom: 15px;
f1ac6348 298}
17119e4a 299
f1ac6348
C
300.footer-bottom {
301 display: flex;
302 flex-direction: column;
303 padding: 0 $menu-lateral-padding;
5d43dae3 304}
8afc19a6 305
5d43dae3 306.footer-links {
931d3430
C
307 &,
308 > div {
5d43dae3
C
309 display: flex;
310 flex-wrap: wrap;
311 }
8afc19a6 312
f1ac6348
C
313 a,
314 span[role=button] {
27bc9586
C
315 @include margin-right(8px);
316
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;
17119e4a 325 }
5d43dae3 326}
8afc19a6 327
5d43dae3
C
328.footer-copyleft small a {
329 @include disable-default-a-behaviour;
4a216666 330
5d43dae3
C
331 color: pvar(--menuForegroundColor);
332 opacity: $footer-links-base-opacity - .2;
d3217560 333}
4a216666 334
2856af48
C
335.dropdown {
336 z-index: #{z('menu') + 1} !important;
337}
338
d3217560
RK
339.dropdown-menu {
340 width: calc(100% + 40px);
cc92203f
C
341
342 // Prevent weird display issue on firefox when global style is not loaded yet
343 &:not(.show) {
344 display: none;
345 }
d3217560 346}
9a0fc840 347
d3217560
RK
348.dropdown-item {
349 @include dropdown-with-icon-item;
9a0fc840 350
d3217560
RK
351 cursor: pointer;
352 display: flex;
353 align-items: center;
354
355 i.glyphicon-menu-right {
356 opacity: .4;
357 }
358
d3217560 359 &:hover {
f1ac6348 360 .hover-display-toggle {
d3217560 361 display: none;
8afc19a6 362 }
51a83970 363
f1ac6348
C
364 .hover-display-toggle[hidden] {
365 display: inherit !important;
51a83970 366 }
8afc19a6 367 }
b33f657c 368}
46ae6f67 369
d3217560
RK
370.more-settings {
371 text-transform: uppercase;
372 font-size: 80%;
373 color: #6c757d;
374}
375
fdebd9a3 376@media screen and (max-width: $mobile-view) {
46ae6f67
C
377 .menu-wrapper {
378 width: 100% !important;
c06be129 379
c06be129
C
380 menu {
381 overflow-y: auto;
382 }
383 }
c0022613 384
f1ac6348
C
385 .top-menu,
386 .footer {
c0022613
C
387 width: 100% !important;
388 }
51a83970
K
389
390 .dropdown-menu {
391 width: calc(100vw - 30px);
392 }
c06be129 393}
f1ac6348
C
394
395my-global-icon {
931d3430 396 &[iconName=playlists] {
27bc9586
C
397 @include margin-right(16px);
398
f1ac6348
C
399 height: 24px;
400 width: 24px;
f1ac6348
C
401 }
402
931d3430 403 &[iconName=videos] {
f1ac6348
C
404 position: relative;
405 right: -1px;
406 }
407
931d3430 408 &[iconName=channel] {
f1ac6348
C
409 margin-top: -2px;
410 }
411
931d3430 412 &[iconName='sign-out'] {
f1ac6348
C
413 position: relative;
414 right: -2px;
415 height: 20px;
416 width: 20px;
417 }
418}