]> git.ipfire.org Git - ipfire.org.git/blob - src/scss/style.scss
index: Add new jumbo container
[ipfire.org.git] / src / scss / style.scss
1 @import "variables";
2
3 // Use all Bootstrap modules that we want
4 @import "../bootstrap/scss/functions";
5 @import "../bootstrap/scss/variables";
6 @import "../bootstrap/scss/mixins";
7 @import "../bootstrap/scss/root";
8 @import "../bootstrap/scss/reboot";
9 @import "../bootstrap/scss/type";
10 @import "../bootstrap/scss/images";
11 @import "../bootstrap/scss/code";
12 @import "../bootstrap/scss/grid";
13 @import "../bootstrap/scss/tables";
14 @import "../bootstrap/scss/forms";
15 @import "../bootstrap/scss/buttons";
16 @import "../bootstrap/scss/transitions";
17 @import "../bootstrap/scss/dropdown";
18 @import "../bootstrap/scss/button-group";
19 @import "../bootstrap/scss/input-group";
20 @import "../bootstrap/scss/custom-forms";
21 @import "../bootstrap/scss/nav";
22 @import "../bootstrap/scss/navbar";
23 @import "../bootstrap/scss/card";
24 @import "../bootstrap/scss/pagination";
25 @import "../bootstrap/scss/breadcrumb";
26 @import "../bootstrap/scss/badge";
27 @import "../bootstrap/scss/alert";
28 @import "../bootstrap/scss/progress";
29 @import "../bootstrap/scss/media";
30 @import "../bootstrap/scss/list-group";
31 @import "../bootstrap/scss/close";
32 @import "../bootstrap/scss/modal";
33 @import "../bootstrap/scss/spinners";
34 @import "../bootstrap/scss/utilities";
35 @import "../bootstrap/scss/print";
36
37 // Include fonts
38 @import "_fonts.scss";
39
40 // Custom stuff
41 @import "icons";
42 @import "code-highlighting";
43
44 // Makes everything white with dark text on it
45 .inverse {
46 background-color: $body-color;
47 color: $body-bg;
48 }
49
50 body {
51 display: flex;
52 min-height: 100vh;
53 flex-flow: column;
54
55 // Make the wiki slightly narrower
56 &.wiki-ipfire-org {
57 @include media-breakpoint-up(xl) {
58 .container {
59 max-width: 900px;
60 }
61 }
62 }
63 }
64
65 // Buttons
66 .btn {
67 text-transform: uppercase;
68 }
69
70 @each $color, $value in $theme-colors {
71 .glow-#{$color} {
72 color: white;
73 background-color: rgba($value, .15);
74 }
75 }
76
77 code {
78 background-color: $dark;
79 border-radius: $border-radius;
80 padding: 0.1rem 0.2rem;
81 }
82
83 pre {
84 background-color: $dark;
85 border-radius: $border-radius;
86 padding: 0.5rem;
87
88 code {
89 background-color: inherit;
90 padding: 0;
91 }
92
93 &.pre-light {
94 background-color: $white;
95 color: $body-bg;
96 }
97 }
98
99 .card {
100 @extend .inverse;
101
102 // Reset padding for sections
103 section {
104 padding: 0;
105 }
106 }
107
108 .list-group {
109 .list-group-item {
110 color: $body-bg;
111 }
112 }
113
114 .nav {
115 .nav-link {
116 color: $white;
117
118 &.active {
119 color: $link-color;
120 border-left: 2px solid $link-color;
121 }
122 }
123 }
124
125 .navbar {
126 background-color: rgba($gray-400, .06);
127
128 // Webkit is being stupid and cannot figure out the height
129 // of the navbar by itself
130 min-height: $navbar-height;
131
132 .navbar-brand {
133 color: inherit;
134 }
135
136 .navbar-nav {
137 .nav-link {
138 color: inherit;
139
140 &.active {
141 border-bottom: 2px solid $link-color;
142 }
143 }
144 }
145 }
146
147 .bg-brand {
148 min-height: 40rem;
149
150 // Background Image
151 background-image: url("img/bg-img.jpg");
152 background-repeat: no-repeat;
153 background-position: center;
154 background-size: cover;
155
156 // Text is white
157 color: $white;
158
159 // Center the content
160 display: flex;
161 flex-direction: column;
162 justify-content: center;
163 }
164
165 headeXXr {
166 &.cover {
167 position: relative;
168 width: 100%;
169 height: auto;
170 min-height: 42rem;
171
172 @include media-breakpoint-up(lg) {
173 height: calc(100vh - #{$navbar-height});
174 }
175 }
176 }
177
178 .icon-large {
179 font-size: 8em;
180
181 @include media-breakpoint-up(md) {
182 font-size: 6em;
183 }
184
185 @include media-breakpoint-up(lg) {
186 font-size: 8em;
187 }
188
189 @include media-breakpoint-up(xl) {
190 font-size: 10em;
191 }
192 }
193
194 footer {
195 margin-top: auto;
196
197 .footer {
198 margin-top: $spacer * 3;
199
200 .footer-info {
201 padding: 2rem 0 0 0;
202
203 color: $white;
204 background-color: rgba($gray-400, .04);
205
206 @include media-breakpoint-down(md) {
207 padding-top: 31px;
208 }
209
210 a, .btn-link {
211 color: inherit;
212
213 &:hover {
214 color: inherit;
215 }
216 }
217
218 ul {
219 li {
220 margin-bottom: $spacer / 4;
221 }
222 }
223 }
224
225 .copyright {
226 background-color: rgba($gray-400, .06);
227 padding: $spacer 0;
228
229 font-size: $small-font-size;
230
231 a {
232 color: $text-muted;
233 }
234 }
235 }
236 }
237
238 .map {
239 min-height: 24rem;
240 }
241
242 // Sections
243
244 section {
245 padding: 3rem 1rem;
246
247 @include media-breakpoint-up(md) {
248 padding: 5rem 0;
249 }
250
251 @include media-breakpoint-up(md) {
252 // Reset large headlines to normal size on mobile devices
253 h1 {
254 font-size: $display1-size;
255 font-weight: $display1-weight;
256 line-height: $display-line-height;
257 }
258 }
259 }
260
261 blockquote {
262 @extend .blockquote;
263
264 // Add a light border to the left
265 border-left: 0.5rem solid $light;
266 padding: $spacer;
267
268 quotes: "“" "”" "“" "”";
269
270 // Quote
271 &:before{
272 color: $light;
273 font-size: $display1-size;
274 line-height: 0;
275 margin-right: 0.25em;
276 vertical-align: -0.4em;
277 }
278
279 &:before {
280 content: open-quote;
281 }
282
283 p {
284 margin-bottom: 0;
285 }
286 }
287
288 .blog-post {
289 .blog-header {
290 h4 {
291 margin-bottom: 0;
292
293 a {
294 color: $dark;
295 }
296 }
297 }
298
299 .blog-content {
300 h1, h2, h3, h4, h5, h6 {
301 font-size: 1.375rem;
302 font-weight: $headings-font-weight;
303 line-height: $headings-line-height;
304 margin-bottom: 0.25rem;
305 }
306
307 img {
308 @include img-fluid;
309
310 // Center all images
311 display: block;
312 margin-left: auto;
313 margin-right: auto;
314
315 // Add some extra margin to the top & bottom
316 padding: ($spacer * 2) 0 ($spacer * 2) 0;
317 }
318 }
319
320 &.lightning-wire-labs {
321 .blog-header {
322 h5 {
323 a {
324 color: $lwl;
325 }
326 }
327
328 a {
329 color: $lwl;
330 }
331 }
332
333 .blog-content {
334 a {
335 color: $lwl;
336 }
337 }
338 }
339 }
340
341 .wiki-content {
342 h1, h2, h3, h4, h5, h6 {
343 font-weight: $headings-font-weight;
344 line-height: $headings-line-height;
345 margin-bottom: 0.5rem;
346 }
347
348 h1 {
349 font-size: $h4-font-size;
350 }
351
352 h2 {
353 font-size: $h5-font-size;
354 }
355
356 h3, h4, h5, h6 {
357 font-size: $h6-font-size;
358 }
359
360 figure {
361 // Center images
362 display: table;
363 margin-right: auto;
364 margin-left: auto;
365
366 // Add some extra margin to the top & bottom
367 padding: ($spacer * 2) 0 ($spacer * 2) 0;
368 }
369
370 blockquote {
371 @extend .blockquote;
372 }
373
374 table {
375 @extend .table;
376 @extend .table-sm;
377 @extend .table-striped;
378
379 // Apply CSS classes for alignment
380 thead {
381 th[align="left"], td[align="left"] {
382 @extend .text-left;
383 }
384
385 th[align="center"], td[align="center"] {
386 @extend .text-center;
387 }
388
389 th[align="right"], td[align="right"] {
390 @extend .text-right;
391 }
392 }
393 }
394
395 .footnote {
396 font-size: $small-font-size;
397
398 ol {
399 margin-bottom: 0;
400
401 li {
402 p {
403 margin-bottom: 0;
404 }
405 }
406 }
407 }
408 }
409
410 #preview {
411 // Hide the spinner by default
412 #spinner {
413 display: none;
414 }
415
416 #preview-content {
417 @include transition(opacity .5s linear);
418 }
419
420 &.updating {
421 // Show the spinner during updates
422 #spinner {
423 display: block;
424 }
425
426 // While updating, we face out the content
427 #preview-content {
428 opacity: 0.5;
429 }
430 }
431 }
432
433 hr.divider {
434 border-color: rgba($dark, .15);
435 margin-top: 2rem;
436 margin-bottom: 3rem;
437 }
438
439 .circle {
440 position: relative;
441 p.fireinfo_per {
442 color: $gray-800;
443 position: absolute;
444 top: calc(50% - 18px);
445 width: 100%;
446 }
447 }
448
449 .pdf-viewer {
450 width: 100%;
451 min-height: 32rem;
452 }