]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/application.scss
Refactor - improve offset content handling with fixed sub-menu and broadcast-message
[github/Chocobozzz/PeerTube.git] / client / src / sass / application.scss
CommitLineData
161b061d 1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
63c4db6d 2
9b8a7aa8 3@import '_bootstrap-variables';
dcbc29d5
C
4@import '_variables';
5@import '_mixins';
6
fa40cbc3 7@import '_fonts';
63c4db6d 8
d592e0a9 9@import '~video.js/dist/video-js.css';
c893d451 10
583eb04b 11$assets-path: '../../assets/';
b335ccec 12@import './player/index';
e31f6ad6 13
2f4c784a 14@import './bootstrap';
bbe0f064
C
15@import './primeng-custom';
16
383bfc83
C
17[hidden] {
18 display: none !important;
19}
a64668c0 20
b33f657c 21body {
dcbc29d5
C
22 /*** theme ***/
23 // now beware node-sass requires interpolation
24 // for css custom properties #{$var}
680b5496
RK
25 --mainColor: #{$main-color};
26 --mainColorLighter: #{$main-color-lighter};
a6d5ff76 27 --mainColorLightest: #{$main-color-lightest};
680b5496 28 --mainHoverColor: #{$main-hover-color};
dcbc29d5
C
29 --mainBackgroundColor: #{$bg-color};
30 --mainForegroundColor: #{$fg-color};
680b5496 31 --secondaryColor: #{$secondary-color};
2fcc2294 32
c123027f 33 --greyForegroundColor: #{$grey-foreground-color};
441e453a 34 --greyBackgroundColor: #{$grey-background-color};
c123027f 35
1d9d9cfd
RK
36 --menuBackgroundColor: #{$menu-background};
37 --menuForegroundColor: #{$menu-color};
dcbc29d5 38 --submenuColor: #{$sub-menu-color};
2fcc2294 39
3bf07dd8 40 --inputForegroundColor: #{$input-foreground-color};
14aa8556 41 --inputBackgroundColor: #{$input-background-color};
dcbc29d5
C
42 --inputPlaceholderColor: #{$input-placeholder-color};
43
3bf07dd8 44 --textareaForegroundColor: #{$textarea-foreground-color};
b15fe00f 45 --textareaBackgroundColor: #{$textarea-background-color};
f33dc6ab 46 --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color};
b15fe00f 47
0240da5c
RK
48 --actionButtonColor: #{$grey-foreground-color};
49 --supportButtonBackgroundColor: #{transparent};
e66883b3 50 --supportButtonColor: #{pvar(--actionButtonColor)};
0240da5c 51 --supportButtonHeartColor: #{$support-button-heart};
2fcc2294 52
5f57df54
C
53 --activatedActionButtonColor: #{$activated-action-button-color};
54
10846ef6
C
55 --expanded-horizontal-margin-content: $expanded-horizontal-margins;
56
8a8e02a4 57 font-family: $main-fonts;
b33f657c 58 font-weight: $font-regular;
e66883b3
RK
59 color: pvar(--mainForegroundColor);
60 background-color: pvar(--mainBackgroundColor);
b34a444e 61 font-size: 14px;
8110705d 62 // On desktop browsers, make sure vertical scroll bar is always visible
63 // Allow to disable the scrollbar instead of hide it when the content fit the body
64 // And not move the content and header horizontally sticked to right when the content is updating
65 overflow-y: scroll;
b33f657c
C
66}
67
52cc0d54 68::selection {
e66883b3
RK
69 color: pvar(--mainBackgroundColor);
70 background-color: pvar(--mainHoverColor);
52cc0d54
RK
71}
72
73e09f27
C
73#incompatible-browser {
74 display: none;
75 text-align: center;
76 position: absolute;
77 width: 100%;
78 top: 45%;
79}
80
07fa4c97
C
81strong {
82 font-weight: $font-semibold;
83}
84
383bfc83
C
85input.readonly {
86 /* Force blank on readonly inputs */
e66883b3 87 background-color: pvar(--inputBackgroundColor) !important;
0ac5edd9 88}
89
63347a0f
C
90input, textarea {
91 outline: none;
e66883b3 92 color: pvar(--mainForegroundColor);
63347a0f
C
93}
94
adcf9212
CC
95button {
96 background: unset;
97 @include disable-outline;
98}
99
d235f6b0
C
100label {
101 font-weight: $font-bold;
102 font-size: 15px;
09223546
C
103}
104
a2b817d3
C
105.form-error {
106 display: block;
41a676db 107 color: $red;
a2b817d3
C
108 margin-top: 5px;
109}
110
111.input-error {
41a676db 112 border-color: $red !important;
a2b817d3
C
113}
114
2d9fea16
RK
115.fullWidth {
116 width: 100%;
117 margin-left: auto;
118 margin-right: auto;
119 max-width: initial;
120}
121
383bfc83
C
122.glyphicon-black {
123 color: black;
124}
125
c4741804 126.row {
947d0102 127 margin: 0 !important;
c4741804
RK
128}
129
383bfc83 130.main-col {
c30745f3 131 margin-left: $menu-width;
c4741804 132 width: calc(100% - #{$menu-width});
a6d5ff76 133 outline: none;
9bf9d2a5 134
c30745f3 135 .margin-content {
d178b5c1
C
136 margin-left: $not-expanded-horizontal-margins;
137 margin-right: $not-expanded-horizontal-margins;
b34a444e 138 flex-grow: 1;
c30745f3
C
139 }
140
141 .sub-menu {
e66883b3 142 background-color: pvar(--submenuColor);
c30745f3 143 width: 100%;
c30745f3
C
144 display: flex;
145 align-items: center;
d178b5c1 146 padding-left: $not-expanded-horizontal-margins;
22a16e36 147 padding-right: $not-expanded-horizontal-margins;
7034b3c9 148 height: $sub-menu-height;
149 margin-bottom: $sub-menu-margin-bottom;
ae2dd046
C
150
151 &.sub-menu-fixed {
ae2dd046
C
152 position: fixed;
153 z-index: #{z('header') - 1};
a949f676 154 }
c30745f3
C
155 }
156
7034b3c9 157 // Use an appropriate offset top when sub-menu fixed
158 .margin-content.offset-content {
159 padding-top: $sub-menu-height + $sub-menu-margin-bottom;
160 }
161
c30745f3
C
162 // Override some properties if the main content is expanded (no menu on the left)
163 &.expanded {
164 margin-left: 0;
c4741804 165 width: 100%;
c30745f3
C
166
167 .margin-content {
10846ef6
C
168 margin-left: var(--expanded-horizontal-margin-content);
169 margin-right: var(--expanded-horizontal-margin-content);
c30745f3
C
170 }
171
172 .sub-menu {
10846ef6
C
173 padding-left: var(--expanded-horizontal-margin-content);
174 padding-right: var(--expanded-horizontal-margin-content);
c30745f3 175 }
602eb142 176 }
b15fe00f
K
177
178 &.lock-scroll .main-row > router-outlet + * {
179 // Lock and hide body scrollbars
180 position: fixed;
181
182 // Lock and hide sub-menu scrollbars
183 .sub-menu {
184 overflow-x: hidden;
185 }
186 }
383bfc83 187}
602eb142 188
59aa1e5e 189.title-page {
ed5bb517 190 opacity: 0.6;
e66883b3 191 color: pvar(--mainForegroundColor);
59aa1e5e
C
192 font-size: 16px;
193 display: inline-block;
194 margin-right: 55px;
195 font-weight: $font-semibold;
196 @include disable-default-a-behaviour;
197
ed5bb517
K
198 border-bottom: 2px solid transparent;
199
200 &.title-page-single {
59aa1e5e
C
201 margin-top: 30px;
202 margin-bottom: 25px;
203 }
cadb46d8 204
d6ed9ccc 205 &.active {
ed5bb517 206 border-bottom-color: pvar(--mainColor);
d6ed9ccc
RK
207 }
208
209 &.title-page-single {
210 font-size: 125%;
211 }
212
cadb46d8 213 &:hover, &:active, &:focus {
e66883b3 214 color: pvar(--mainForegroundColor);
04e0fc48 215 }
1952a538 216
ed5bb517
K
217 &.active, &:hover, &:active, &:focus, &.title-page-single {
218 opacity: 1;
219 outline: 0px hidden !important;
220 }
221
ece3029b 222 @media screen and (max-width: $mobile-view) {
2c3abc4f 223 margin-right: 15px;
1952a538 224 }
cadb46d8 225}
04e0fc48 226
482fa503
RK
227.title-page-about,
228.title-page-settings {
e61151b0 229 white-space: nowrap;
482fa503 230 font-size: 115%;
482fa503
RK
231}
232
cd83ea1b
C
233.admin-sub-header {
234 display: flex;
235 align-items: center;
236 margin-bottom: 30px;
237
08c1efbe 238 .form-sub-title {
cd83ea1b
C
239 flex-grow: 1;
240 }
65b247dd
C
241
242 .admin-sub-nav a {
243 @include disable-default-a-behaviour;
244
245 font-size: 16px;
e66883b3 246 color: pvar(--mainForegroundColor);
65b247dd
C
247 padding: 5px 15px;
248 border-radius: 0.25rem;
ed5bb517
K
249 font-weight: $font-semibold;
250 opacity: 0.6;
65b247dd
C
251
252 &.active {
65b247dd 253 background-color: #f0f0f0;
ed5bb517
K
254 }
255
256 &.active, &:hover, &:active, &:focus {
257 opacity: 1;
65b247dd
C
258 }
259 }
cd83ea1b
C
260}
261
08c1efbe 262.form-sub-title {
04e0fc48
C
263 font-size: 20px;
264 font-weight: bold;
59aa1e5e
C
265}
266
315cc0cc
C
267@keyframes spin {
268 from { transform: scale(1) rotate(0deg);}
269 to { transform: scale(1) rotate(360deg);}
270}
271
fb4fd623
C
272// In tables, don't have a hover different background
273table {
274 .action-button-edit, .action-button-delete {
275 &:hover, &:active, &:focus, &[disabled], &.disabled {
457bb213 276 background-color: $grey-background-color !important;
fb4fd623
C
277 }
278 }
279}
280
2d3741d6
C
281.no-results {
282 height: 40vh;
22839330
RK
283 max-height: 500px;
284
2d3741d6 285 display: flex;
82f443de 286 flex-direction: column;
2d3741d6
C
287 align-items: center;
288 justify-content: center;
289 font-size: 16px;
290 font-weight: $font-semibold;
291}
292
eb7c7a51
RK
293.dropdown-item {
294 @include dropdown-with-icon-item;
295
296 my-global-icon {
297 width: 22px;
298 height: 22px;
299 }
300}
301
7034b3c9 302/* offsetTop for scrollToAnchor */
303
45e0d669
RK
304.anchor {
305 position: relative;
7034b3c9 306 top: #{-($header-height + 20px)};
307}
308
309.offset-content { // if sub-menu fixed
310 .anchor {
311 top: #{-($header-height + $sub-menu-height + 20px)};
312 }
45e0d669
RK
313}
314
165ee292 315@media screen and (max-width: #{breakpoint(xxl)}) {
2303a803
RK
316 .main-col {
317 &.expanded {
318 .margin-content {
10846ef6 319 --expanded-horizontal-margin-content: $expanded-horizontal-margins/2;
2303a803
RK
320 }
321 }
322 }
323}
324
165ee292 325@media screen and (max-width: #{breakpoint(lg)}) {
1def3c52 326 /* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
1f788f20 327 .main-col {
1def3c52
RK
328 &, &.expanded {
329 .margin-content {
10846ef6 330 --expanded-horizontal-margin-content: $expanded-horizontal-margins/3;
1def3c52 331 }
dd778941 332
1def3c52
RK
333 .sub-menu {
334 padding-left: 50px;
335 padding-right: 50px;
22a16e36 336
1def3c52
RK
337 .title-page {
338 font-size: 17px;
339 }
dd778941 340 }
1f788f20
C
341 }
342 }
343}
344
1f6d2449 345@media screen and (min-width: $mobile-view) and (max-width: $small-view) {
ac6ac4e2 346 .main-col {
347 width: 100%;
348 }
349}
350
8ff3f883 351@media screen and (max-width: $small-view) {
20206dfb
C
352 .main-col {
353 margin-left: 0;
354
355 &, &.expanded {
356 .margin-content {
10846ef6 357 --expanded-horizontal-margin-content: 15px;
20206dfb
C
358 }
359
360 .sub-menu {
2c3abc4f 361 width: 100vw;
dd778941 362 padding-left: 15px;
22a16e36 363 padding-right: 15px;
4682468d 364 margin-bottom: $sub-menu-margin-bottom-small-view;
8544d8f5 365 overflow-x: auto;
20206dfb
C
366 }
367
7034b3c9 368 // Use an appropriate offset top when sub-menu fixed
369 .margin-content.offset-content {
370 padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
371 }
372
7a03209d
K
373 .admin-sub-header {
374 @include admin-sub-header-responsive(15px*2);
375 }
376
b15fe00f
K
377 my-markdown-textarea {
378 .root {
379 max-width: 100% !important;
380 }
381 }
382
4682468d
K
383 input[type=text],
384 input[type=password],
385 input[type=email],
c285180a 386 textarea,
387 .peertube-select-container {
225a7682 388 flex-grow: 1;
20206dfb 389 }
25a42e29
RK
390
391 .caption input[type=text] {
392 width: unset !important;
393 flex-grow: 1;
394 }
20206dfb
C
395 }
396 }
457bb213 397}
7a03209d 398
165ee292 399// overflow-databale responsive rules
c2a89b70 400@media screen and (min-width: #{breakpoint(lg)}) {
165ee292
K
401 .main-col {
402 &.expanded {
c2a89b70 403 @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/2, $mobile-paginator: false);
165ee292
K
404 }
405
406 &:not(.expanded) {
c2a89b70 407 @include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2, $mobile-paginator: false);
165ee292
K
408 }
409 }
410}
411
412@media screen and (max-width: #{breakpoint(lg)}) {
413 .main-col {
414 &.expanded {
415 @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/3);
416 }
417
418 &:not(.expanded) {
c2a89b70 419 @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/3 + $menu-width/2);
165ee292
K
420 }
421 }
422}
423
424@media screen and (max-width: $small-view) {
425 .main-col {
426 &:not(.expanded),
427 &.expanded {
428 @include overflow-datatable(breakpoint(lg), 15px);
429 }
430 }
431}
432
7a03209d
K
433@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
434 .main-col {
435 &:not(.expanded) {
436 .admin-sub-header {
c2a89b70 437 @include admin-sub-header-responsive($expanded-horizontal-margins/3 + $menu-width/2);
7a03209d 438 }
8544d8f5
K
439
440 .sub-menu {
441 overflow-x: auto;
442 width: calc(100vw - #{$menu-width});
443 }
7a03209d
K
444 }
445 }
446}