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