]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/menu/menu.component.scss
Rename actor image edit module
[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
27 &:hover, &.focus-visible {
28 background-color: rgba(255, 255, 255, 0.10);
29 }
30
31 my-global-icon {
32 @include apply-svg-color(#808080);
33
34 display: flex;
35 width: $menu-link-icon-size;
36 height: $menu-link-icon-size;
37 margin-right: $menu-link-icon-margin-right;
38 }
39}
40
8afc19a6
C
41.menu-wrapper {
42 position: fixed;
43 height: calc(100vh - #{$header-height});
44 padding: 0;
45 width: $menu-width;
36f2981f 46 z-index: z(menu);
e66883b3 47 scrollbar-color: pvar(--actionButtonColor) pvar(--menuBackgroundColor);
8afc19a6
C
48}
49
b33f657c 50menu {
ef80c66c
C
51 @include ellipsis;
52
e66883b3 53 background-color: pvar(--menuBackgroundColor);
e66883b3 54 color: pvar(--menuForegroundColor);
17119e4a 55
8afc19a6
C
56 display: flex;
57 flex-direction: column;
17119e4a 58 height: 100%;
46ae6f67 59 width: 100%;
17119e4a
C
60 margin: 0;
61 padding: 0;
8afc19a6 62
a54991da
RK
63 &:focus, &:hover {
64 overflow-y: auto;
65 }
66
ca4b1594
K
67 @media not all and (hover: hover) and (pointer: fine) {
68 overflow-y: auto;
69 }
70
17119e4a 71 &.is-logged-in {
a55052c9 72 .panel-block {
d3217560 73 margin-bottom: 20px;
a55052c9
C
74 }
75
76 .block-title {
77 margin-bottom: 15px;
78 }
79 }
17119e4a 80}
a55052c9 81
17119e4a
C
82.top-menu {
83 flex-grow: 1;
84 width: $menu-width;
85}
66467298 86
17119e4a
C
87.logged-in-block {
88 margin-bottom: 20px;
89 background-color: rgba(255, 255, 255, 0.15);
90
91 > div:first-child {
92 height: 80px;
b33f657c
C
93 display: flex;
94 align-items: center;
51a83970 95 justify-content: left;
5d43dae3
C
96 }
97}
ef80c66c 98
f1ac6348
C
99my-notification {
100 margin-left: auto;
101 margin-right: 15px;
102}
5d43dae3 103
f1ac6348 104.logged-in-more {
5d43dae3
C
105 @mixin display-hints($is-mobile: false) {
106 background-color: rgba(255, 255, 255, 0.15);
b33f657c 107
5d43dae3
C
108 @if $is-mobile {
109 .dropdown-toggle-indicator {
110 display: inherit !important;
111 }
112 .dropdown-toggle:first-child {
113 padding-right: 30px !important;
51a83970 114 }
5d43dae3
C
115 }
116 }
b33f657c 117
f1ac6348
C
118 $main-radius: 25px;
119
120 flex: 1;
121 margin-left: 13px;
122 border-radius: $main-radius;
123 transition: all .1s ease-in-out;
124 cursor: pointer;
125 line-height: 1;
126
127 &.show {
128 background-color: rgba(255, 255, 255, 0.20);
129 box-shadow: inset 0 3px 5px rgba(0, 0, 0, .325);
130 }
131
5d43dae3
C
132 &:hover {
133 @include display-hints;
134 }
63347a0f 135
5d43dae3
C
136 /* smartphones and touchscreens */
137 @media (hover: none) and (pointer: coarse) {
138 @include display-hints($is-mobile: true);
51a83970 139
5d43dae3
C
140 /* fill space when on mobile */
141 max-width: calc(100% - 80px);
f1ac6348 142
5d43dae3
C
143 .dropdown-toggle {
144 max-width: 100%;
145 }
f1ac6348 146
5d43dae3
C
147 .logged-in-info {
148 max-width: calc(100% - 45px) !important;
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 }
f1ac6348 178}
51a83970 179
f1ac6348
C
180my-account-avatar {
181 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
C
195.logged-in-display-name {
196 font-size: 16px;
197 font-weight: $font-semibold;
198 color: pvar(--menuForegroundColor);
51a83970 199
f1ac6348
C
200 @include disable-default-a-behaviour;
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
C
217 $icon-size: 13px;
218 $additional-margin: ($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
C
224 my-global-icon {
225 width: $icon-size;
226 height: $icon-size;
b33f657c 227
5d43dae3
C
228 // Keep aligned with other icons
229 margin-left: $additional-margin;
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
C
246 my-global-icon {
247 margin-left: $additional-margin - $border-left-width;
b33f657c
C
248 }
249 }
250 }
17119e4a
C
251}
252
253.login-buttons-block {
254 margin: 30px 25px 35px 25px;
255
f1ac6348 256 > a {
17119e4a
C
257 display: block;
258 width: 100%;
17119e4a 259
f1ac6348
C
260 :not(:last-child) {
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
f0048d5e 275.in-my-library,
17119e4a
C
276.on-instance,
277.footer-block {
278 margin-bottom: 15px;
b33f657c
C
279
280 .block-title {
f1ac6348
C
281 @include ellipsis;
282
b33f657c
C
283 text-transform: uppercase;
284 font-weight: $font-bold; // Bold
285 font-size: 13px;
286 margin-bottom: 25px;
829be6e8 287 margin-left: 26px;
17119e4a
C
288 margin-right: 30px;
289 }
0727cab0 290
17119e4a 291 a {
17119e4a 292 min-height: 40px;
b33f657c 293 }
17119e4a
C
294}
295
296.footer {
297 width: $menu-width;
298 padding-bottom: 15px;
f1ac6348 299}
17119e4a 300
f1ac6348
C
301.footer-bottom {
302 display: flex;
303 flex-direction: column;
304 padding: 0 $menu-lateral-padding;
5d43dae3 305}
8afc19a6 306
5d43dae3
C
307.footer-links {
308 &, > div {
309 display: flex;
310 flex-wrap: wrap;
311 }
8afc19a6 312
f1ac6348
C
313 a,
314 span[role=button] {
5d43dae3
C
315 display: inline-block;
316 text-decoration: none;
317 color: pvar(--menuForegroundColor);
318 opacity: $footer-links-base-opacity;
319 white-space: nowrap;
320 font-size: 90%;
321 font-weight: 500;
322 line-height: 1.4rem;
323 margin-right: 8px;
17119e4a 324 }
5d43dae3 325}
8afc19a6 326
5d43dae3
C
327.footer-copyleft small a {
328 @include disable-default-a-behaviour;
4a216666 329
5d43dae3
C
330 color: pvar(--menuForegroundColor);
331 opacity: $footer-links-base-opacity - .2;
d3217560 332}
4a216666 333
2856af48
C
334.dropdown {
335 z-index: #{z('menu') + 1} !important;
336}
337
d3217560
RK
338.dropdown-menu {
339 width: calc(100% + 40px);
340}
9a0fc840 341
d3217560
RK
342.dropdown-item {
343 @include dropdown-with-icon-item;
9a0fc840 344
d3217560
RK
345 cursor: pointer;
346 display: flex;
347 align-items: center;
348
349 i.glyphicon-menu-right {
350 opacity: .4;
351 }
352
d3217560 353 &:hover {
f1ac6348 354 .hover-display-toggle {
d3217560 355 display: none;
8afc19a6 356 }
51a83970 357
f1ac6348
C
358 .hover-display-toggle[hidden] {
359 display: inherit !important;
51a83970 360 }
8afc19a6 361 }
b33f657c 362}
46ae6f67 363
d3217560
RK
364.more-settings {
365 text-transform: uppercase;
366 font-size: 80%;
367 color: #6c757d;
368}
369
fdebd9a3 370@media screen and (max-width: $mobile-view) {
46ae6f67
C
371 .menu-wrapper {
372 width: 100% !important;
c06be129 373
c06be129
C
374 menu {
375 overflow-y: auto;
376 }
377 }
c0022613 378
f1ac6348
C
379 .top-menu,
380 .footer {
c0022613
C
381 width: 100% !important;
382 }
51a83970
K
383
384 .dropdown-menu {
385 width: calc(100vw - 30px);
386 }
387
f1ac6348
C
388 .dropdown-item:hover,
389 .dropdown-item:active {
51a83970
K
390 &.settings-sensitive my-global-icon ::ng-deep svg {
391 margin-top: 0px !important;
392 }
393 }
c06be129 394}
f1ac6348
C
395
396my-global-icon {
397 &[iconName="playlists"] {
398 height: 24px;
399 width: 24px;
400
401 margin-right: 16px;
402 }
403
404 &[iconName="videos"] {
405 position: relative;
406 right: -1px;
407 }
408
409 &[iconName="channel"] {
410 margin-top: -2px;
411 }
412
413 &[iconName="sign-out"] {
414 position: relative;
415 right: -2px;
416 height: 20px;
417 width: 20px;
418 }
419}