]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/application.scss
Fix broken views on mobile and small screens (#2671)
[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
1d9d9cfd
RK
34 --menuBackgroundColor: #{$menu-background};
35 --menuForegroundColor: #{$menu-color};
dcbc29d5 36 --submenuColor: #{$sub-menu-color};
2fcc2294 37
14aa8556 38 --inputBackgroundColor: #{$input-background-color};
dcbc29d5
C
39 --inputPlaceholderColor: #{$input-placeholder-color};
40
0240da5c
RK
41 --actionButtonColor: #{$grey-foreground-color};
42 --supportButtonBackgroundColor: #{transparent};
43 --supportButtonColor: #{var(--actionButtonColor)};
44 --supportButtonHeartColor: #{$support-button-heart};
2fcc2294 45
8a8e02a4 46 font-family: $main-fonts;
b33f657c 47 font-weight: $font-regular;
9a0fc840 48 color: var(--mainForegroundColor);
cdbfd2b0 49 background-color: var(--mainBackgroundColor);
b34a444e 50 font-size: 14px;
b33f657c
C
51}
52
52cc0d54
RK
53::selection {
54 color: var(--mainBackgroundColor);
55 background-color: var(--mainHoverColor);
56}
57
73e09f27
C
58#incompatible-browser {
59 display: none;
60 text-align: center;
61 position: absolute;
62 width: 100%;
63 top: 45%;
64}
65
07fa4c97
C
66strong {
67 font-weight: $font-semibold;
68}
69
383bfc83
C
70input.readonly {
71 /* Force blank on readonly inputs */
14aa8556 72 background-color: var(--inputBackgroundColor) !important;
0ac5edd9 73}
74
63347a0f
C
75input, textarea {
76 outline: none;
20c3a59e 77 color: var(--mainForegroundColor);
63347a0f
C
78}
79
d235f6b0
C
80label {
81 font-weight: $font-bold;
82 font-size: 15px;
09223546
C
83}
84
a2b817d3
C
85.form-error {
86 display: block;
41a676db 87 color: $red;
a2b817d3
C
88 margin-top: 5px;
89}
90
91.input-error {
41a676db 92 border-color: $red !important;
a2b817d3
C
93}
94
2d9fea16
RK
95.fullWidth {
96 width: 100%;
97 margin-left: auto;
98 margin-right: auto;
99 max-width: initial;
100}
101
383bfc83
C
102.glyphicon-black {
103 color: black;
104}
105
c4741804 106.row {
947d0102 107 margin: 0 !important;
c4741804
RK
108}
109
383bfc83 110.main-col {
c30745f3 111 margin-left: $menu-width;
c4741804 112 width: calc(100% - #{$menu-width});
a6d5ff76 113 outline: none;
9bf9d2a5 114
c30745f3 115 .margin-content {
d178b5c1
C
116 margin-left: $not-expanded-horizontal-margins;
117 margin-right: $not-expanded-horizontal-margins;
b34a444e 118 flex-grow: 1;
c30745f3
C
119 }
120
121 .sub-menu {
9a0fc840 122 background-color: var(--submenuColor);
c30745f3
C
123 width: 100%;
124 height: 81px;
bce47964 125 margin-bottom: $sub-menu-margin-bottom;
c30745f3
C
126 display: flex;
127 align-items: center;
d178b5c1 128 padding-left: $not-expanded-horizontal-margins;
22a16e36 129 padding-right: $not-expanded-horizontal-margins;
c30745f3
C
130 }
131
132 // Override some properties if the main content is expanded (no menu on the left)
133 &.expanded {
134 margin-left: 0;
c4741804 135 width: 100%;
c30745f3
C
136
137 .margin-content {
138 margin-left: $expanded-horizontal-margins;
139 margin-right: $expanded-horizontal-margins;
140 }
141
142 .sub-menu {
143 padding-left: $expanded-horizontal-margins;
22a16e36 144 padding-right: $expanded-horizontal-margins;
c30745f3 145 }
602eb142 146 }
383bfc83 147}
602eb142 148
59aa1e5e 149.title-page {
9a0fc840 150 color: var(--mainForegroundColor);
59aa1e5e
C
151 font-size: 16px;
152 display: inline-block;
153 margin-right: 55px;
154 font-weight: $font-semibold;
155 @include disable-default-a-behaviour;
156
157 &.active, &.title-page-single {
59aa1e5e
C
158 margin-top: 30px;
159 margin-bottom: 25px;
160 }
cadb46d8 161
d6ed9ccc 162 &.active {
96f6278f 163 font-weight: $font-bold;
d6ed9ccc
RK
164 border-bottom: 2px solid var(--mainColor);
165 }
166
167 &.title-page-single {
168 font-size: 125%;
169 }
170
cadb46d8 171 &:hover, &:active, &:focus {
9a0fc840 172 color: var(--mainForegroundColor);
04e0fc48 173 }
1952a538 174
ece3029b 175 @media screen and (max-width: $mobile-view) {
2c3abc4f 176 margin-right: 15px;
1952a538 177 }
cadb46d8 178}
04e0fc48 179
482fa503
RK
180.title-page-about,
181.title-page-settings {
e61151b0 182 white-space: nowrap;
482fa503
RK
183 font-size: 115%;
184 font-weight: $font-regular;
185
186 &.active {
187 font-weight: $font-semibold;
188 }
189}
190
cd83ea1b
C
191.admin-sub-header {
192 display: flex;
193 align-items: center;
194 margin-bottom: 30px;
195
08c1efbe 196 .form-sub-title {
cd83ea1b
C
197 flex-grow: 1;
198 }
65b247dd
C
199
200 .admin-sub-nav a {
201 @include disable-default-a-behaviour;
202
203 font-size: 16px;
9a0fc840 204 color: var(--mainForegroundColor);
65b247dd
C
205 padding: 5px 15px;
206 border-radius: 0.25rem;
207
208 &.active {
209 font-weight: $font-semibold;
210 background-color: #f0f0f0;
9a0fc840 211 color: #000;
65b247dd
C
212 }
213 }
cd83ea1b
C
214}
215
08c1efbe 216.form-sub-title {
04e0fc48
C
217 font-size: 20px;
218 font-weight: bold;
59aa1e5e
C
219}
220
315cc0cc
C
221@keyframes spin {
222 from { transform: scale(1) rotate(0deg);}
223 to { transform: scale(1) rotate(360deg);}
224}
225
fb4fd623
C
226// In tables, don't have a hover different background
227table {
228 .action-button-edit, .action-button-delete {
229 &:hover, &:active, &:focus, &[disabled], &.disabled {
457bb213 230 background-color: $grey-background-color !important;
fb4fd623
C
231 }
232 }
233}
234
2d3741d6
C
235.no-results {
236 height: 40vh;
237 display: flex;
238 align-items: center;
239 justify-content: center;
240 font-size: 16px;
241 font-weight: $font-semibold;
242}
243
eb7c7a51
RK
244.dropdown-item {
245 @include dropdown-with-icon-item;
246
247 my-global-icon {
248 width: 22px;
249 height: 22px;
250 }
251}
252
45e0d669
RK
253.anchor {
254 position: relative;
255 top: #{-($header-height + 20px)};
256}
257
9b8a7aa8 258@media screen and (max-width: #{map-get($grid-breakpoints, xxl)}) {
2303a803
RK
259 .main-col {
260 &.expanded {
261 .margin-content {
262 margin-left: $expanded-horizontal-margins/2;
263 margin-right: $expanded-horizontal-margins/2;
264 }
265 }
266 }
267}
268
9b8a7aa8 269@media screen and (max-width: #{map-get($grid-breakpoints, lg)}) {
1f788f20 270 .main-col {
2303a803 271 &.expanded {
1f788f20 272 .margin-content {
2303a803
RK
273 margin-left: $expanded-horizontal-margins/3;
274 margin-right: $expanded-horizontal-margins/3;
1f788f20 275 }
dd778941
C
276
277 .sub-menu {
278 padding-left: 50px;
947d0102 279 padding-right: 50px;
22a16e36
C
280
281 .title-page {
24e7916c 282 font-size: 17px;
22a16e36 283 }
dd778941 284 }
1f788f20
C
285 }
286 }
287}
288
8ff3f883 289@media screen and (max-width: $small-view) {
20206dfb
C
290 .main-col {
291 margin-left: 0;
292
293 &, &.expanded {
294 .margin-content {
6693df9d
C
295 margin-left: 15px;
296 margin-right: 15px;
20206dfb
C
297 }
298
299 .sub-menu {
2c3abc4f
C
300 width: 100vw;
301 overflow-x: auto;
dd778941 302 padding-left: 15px;
22a16e36 303 padding-right: 15px;
4682468d 304 margin-bottom: $sub-menu-margin-bottom-small-view;
20206dfb
C
305 }
306
4682468d
K
307 input[type=text],
308 input[type=password],
309 input[type=email],
310 textarea {
20206dfb
C
311 width: 100% !important;
312 }
313 }
314 }
457bb213 315}