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