]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/sass/application.scss
Refactor how we use icons
[github/Chocobozzz/PeerTube.git] / client / src / sass / application.scss
1 $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2 @import '_bootstrap';
3
4 @import '_variables';
5 @import '_mixins';
6
7 @import '_fonts';
8
9 @import '~video.js/dist/video-js.css';
10
11 $assets-path: '../assets/';
12 @import './player/index';
13 @import './loading-bar';
14
15 @import './primeng-custom';
16
17 [hidden] {
18 display: none !important;
19 }
20
21 body {
22 /*** theme ***/
23 // now beware node-sass requires interpolation
24 // for css custom properties #{$var}
25 --mainColor: #{$orange-color};
26 --mainHoverColor: #{$orange-hover-color};
27 --mainBackgroundColor: #{$bg-color};
28 --mainForegroundColor: #{$fg-color};
29 --menuBackgroundColor: #{$menu-background};
30 --menuForegroundColor: #{$menu-color};
31 --submenuColor: #{$sub-menu-color};
32 --inputColor: #{$input-background-color};
33 --inputPlaceholderColor: #{$input-placeholder-color};
34
35 font-family: $main-fonts;
36 font-weight: $font-regular;
37 color: var(--mainForegroundColor);
38 font-size: 14px;
39 }
40
41 #incompatible-browser {
42 display: none;
43 text-align: center;
44 position: absolute;
45 width: 100%;
46 top: 45%;
47 }
48
49 strong {
50 font-weight: $font-semibold;
51 }
52
53 input.readonly {
54 /* Force blank on readonly inputs */
55 background-color: var(--inputColor) !important;
56 }
57
58 input, textarea {
59 outline: none;
60 color: var(--mainForegroundColor);
61 }
62
63 .btn-outline-secondary {
64 border-color: $input-border-color;
65 }
66
67 label {
68 font-weight: $font-bold;
69 font-size: 15px;
70 }
71
72 .form-error {
73 display: block;
74 color: $red;
75 margin-top: 5px;
76 }
77
78 .input-error {
79 border-color: $red !important;
80 }
81
82 .fullWidth {
83 width: 100%;
84 margin-left: auto;
85 margin-right: auto;
86 max-width: initial;
87 }
88
89 .glyphicon-black {
90 color: black;
91 }
92
93 .main-col {
94 margin-left: $menu-width;
95 width: auto;
96
97 .margin-content {
98 margin-left: $not-expanded-horizontal-margins;
99 margin-right: $not-expanded-horizontal-margins;
100 flex-grow: 1;
101 }
102
103 .sub-menu {
104 background-color: var(--submenuColor);
105 width: 100%;
106 height: 81px;
107 margin-bottom: 30px;
108 display: flex;
109 align-items: center;
110 padding-left: $not-expanded-horizontal-margins;
111 padding-right: $not-expanded-horizontal-margins;
112 }
113
114 // Override some properties if the main content is expanded (no menu on the left)
115 &.expanded {
116 margin-left: 0;
117
118 .margin-content {
119 margin-left: $expanded-horizontal-margins;
120 margin-right: $expanded-horizontal-margins;
121 }
122
123 .sub-menu {
124 padding-left: $expanded-horizontal-margins;
125 padding-right: $expanded-horizontal-margins;
126 }
127 }
128 }
129
130 .title-page {
131 color: var(--mainForegroundColor);
132 font-size: 16px;
133 display: inline-block;
134 margin-right: 55px;
135 font-weight: $font-semibold;
136 @include disable-default-a-behaviour;
137
138 &.active, &.title-page-single {
139 border-bottom: 2px solid var(--mainColor);
140 font-weight: $font-bold;
141 margin-top: 30px;
142 margin-bottom: 25px;
143 }
144
145 &:hover, &:active, &:focus {
146 color: var(--mainForegroundColor);
147 }
148
149 @media screen and (max-width: 500px) {
150 margin-right: 20px;
151 }
152 }
153
154 .admin-sub-header {
155 display: flex;
156 align-items: center;
157 margin-bottom: 30px;
158
159 .form-sub-title {
160 flex-grow: 1;
161 }
162
163 .admin-sub-nav a {
164 @include disable-default-a-behaviour;
165
166 font-size: 16px;
167 color: var(--mainForegroundColor);
168 padding: 5px 15px;
169 border-radius: 0.25rem;
170
171 &.active {
172 font-weight: $font-semibold;
173 background-color: #f0f0f0;
174 color: #000;
175 }
176 }
177 }
178
179 .form-sub-title {
180 font-size: 20px;
181 font-weight: bold;
182 }
183
184 // Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d
185 .glyphicon-refresh-animate {
186 animation: spin .7s infinite linear;
187 }
188
189 @keyframes spin {
190 from { transform: scale(1) rotate(0deg);}
191 to { transform: scale(1) rotate(360deg);}
192 }
193
194 // Bootstrap customizations
195 .dropdown-menu {
196 border-radius: 3px;
197 box-shadow: 0 3px 6px;
198 font-size: 15px;
199
200 .dropdown-item {
201 padding: 3px 15px;
202
203 &:active {
204 color: #000 !important;
205 }
206 }
207
208 button {
209 @include disable-default-a-behaviour;
210 }
211
212 a {
213 @include disable-default-a-behaviour;
214 color: #000 !important;
215 }
216 }
217
218 .modal {
219 .modal-content {
220 background-color: var(--mainBackgroundColor);
221 }
222
223 .modal-header {
224 border-bottom: none;
225 margin-bottom: 5px;
226
227 .modal-title {
228 font-size: 20px;
229 font-weight: $font-semibold;
230 }
231
232 my-global-icon {
233 @include icon(24px);
234
235 position: relative;
236 top: 3px;
237 float: right;
238
239 margin: 0;
240 padding: 0;
241 opacity: 1;
242 }
243 }
244
245 .inputs {
246 margin-bottom: 0;
247 text-align: right;
248
249 .action-button-cancel {
250 @include peertube-button;
251 @include grey-button;
252
253 display: inline-block;
254 margin-right: 10px;
255 }
256
257 .action-button-submit {
258 @include peertube-button;
259 @include orange-button;
260 }
261 }
262 }
263
264 // Nav customizations
265 .nav .nav-link {
266 display: flex !important;
267 align-items: center;
268 height: 30px !important;
269 padding: 10px 15px !important;
270 }
271
272 .nav.nav-pills {
273 font-size: 16px !important;
274
275 .nav-link.active {
276 font-weight: $font-semibold !important;
277 }
278
279 a {
280 @include disable-default-a-behaviour;
281
282 color: var(--mainForegroundColor);
283 }
284 }
285
286 ngb-tabset.bootstrap {
287
288 .nav-link {
289 &, & a {
290 @include disable-default-a-behaviour;
291
292 color: var(--mainForegroundColor) !important;
293 }
294 }
295 }
296
297 .nav-tabs .nav-link.active {
298 background-color: var(--mainBackgroundColor) !important;
299 border-bottom: none;
300 }
301
302 .orange-button {
303 @include peertube-button;
304 @include orange-button;
305 }
306
307 .orange-button-link {
308 @include peertube-button-link;
309 @include orange-button;
310 }
311
312 .grey-button {
313 @include peertube-button;
314 @include grey-button;
315 }
316
317 .grey-button-link {
318 @include peertube-button-link;
319 @include grey-button;
320 }
321
322 // In tables, don't have a hover different background
323 table {
324 .action-button-edit, .action-button-delete {
325 &:hover, &:active, &:focus, &[disabled], &.disabled {
326 background-color: $grey-background-color !important;
327 }
328 }
329 }
330
331 .no-results {
332 height: 40vh;
333 display: flex;
334 align-items: center;
335 justify-content: center;
336 font-size: 16px;
337 font-weight: $font-semibold;
338 }
339
340 @media screen and (max-width: 1600px) {
341 .main-col {
342 &.expanded {
343 .margin-content {
344 margin-left: $expanded-horizontal-margins/2;
345 margin-right: $expanded-horizontal-margins/2;
346 }
347 }
348 }
349 }
350
351 @media screen and (max-width: 900px) {
352 .main-col {
353 &.expanded {
354 .margin-content {
355 margin-left: $expanded-horizontal-margins/3;
356 margin-right: $expanded-horizontal-margins/3;
357 }
358
359 .sub-menu {
360 padding-left: 50px;
361
362 .title-page {
363 font-size: 15px;
364 }
365 }
366 }
367 }
368 }
369
370 @media screen and (max-width: $small-view) {
371 .main-col {
372 margin-left: 0;
373
374 &, &.expanded {
375 .margin-content {
376 margin-left: 15px;
377 margin-right: 15px;
378 }
379
380 .sub-menu {
381 padding-left: 15px;
382 padding-right: 15px;
383 margin-bottom: 10px;
384 }
385
386 input[type=text], input[type=password] {
387 width: 100% !important;
388 }
389 }
390 }
391 }