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