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