]> jfr.im git - irc/freenode/web-7.0.git/blame_incremental - static/css/style.css
Add styling to distinguish table rows. Close #167
[irc/freenode/web-7.0.git] / static / css / style.css
... / ...
CommitLineData
1/* vars */
2:root {
3 --c-dark: #292f2f;
4 --c-bg-dark: #3a4346;
5 --c-bg-light: #4c5456;
6 --c-light: #ecf7fa;
7 --c-hl-dark: #008499;
8 --c-hl-light: #3baec4;
9 --c-shadow: #dae5e2;
10
11 /* backgrounds */
12 --navbar-bg: var(--c-dark);
13 --jumbotron-bg: var(--c-bg-dark);
14 --copyright-bg: var(--c-dark);
15
16 /* link colors */
17 --link-color: var(--c-hl-dark);
18 --link-hover-color: var(--c-hl-light);
19 --footer-link-color: var(--c-light);
20 --footer-hover-color: #fff;
21
22 /* text colors */
23 --text-color: var(--c-dark);
24 --footer-text-color: var(--c-light);
25 --copyright-text-color: var(--c-light);
26 --jumbotron-text-color: var(--c-light);
27 --art-date-color: color(var(--c-dark) tint(50%));
28
29 /* box colors */
30 --border-color: var(--c-dark);
31 --box-color: var(--c-bg-light);
32 --box-hover-color: var(--c-dark);;
33 --box-round: 10px;
34
35 /* other */
36 --max-width: 600px;
37 --max-width-box: 800px;
38 --margin-box-fa: 5px;
39}
40@custom-media --max-sm all and (max-width: 600px);
41@custom-media --max-md all and (max-width: 800px);
42@custom-media --max-rem all and (max-width: 60rem);
43
44/* reset css for browser compat */
45* {
46 margin: 0;
47 padding: 0;
48 box-sizing: border-box;
49}
50
51/* global */
52body {
53 font-family: 'Open Sans';
54 font-feature-settings: "lnum";
55 font-variant-numeric: lining-nums;
56 color: var(--text-color);
57 font-size: 14px;
58 min-height: 100vh;
59 height: auto;
60}
61
62a {
63 color: var(--link-color);
64 text-decoration: none;
65}
66
67a:hover {
68 color: var(--link-hover-color);
69}
70img {
71 max-width: 100%;
72}
73
74/* navbar */
75.navbar {
76 width: 100%;
77 height: 50px;
78 background-color: var(--navbar-bg);
79 box-shadow: 0 3px 4px rgba(0, 0, 0, 0.5);
80 position: fixed;
81 left: 0;
82 right: 0;
83 top: 0;
84 display: flex;
85 flex-wrap: nowrap;
86 justify-content: space-between;
87 align-items: center;
88 border-bottom: 1px solid var(--border-color);
89 z-index: 100;
90 padding-right: 5px;
91}
92
93@media (--max-sm) {
94 .navbar {
95 position: absolute;
96 }
97}
98
99.navbar a {
100 margin-top: 2px;
101 height: 40px;
102}
103
104.nlogo {
105 height: 40px;
106}
107
108.tlogo {
109 height: 40px;
110 margin-bottom: -9px;
111 margin-left: -10px;
112 margin-right: -10px;
113}
114
115/* main */
116.container {
117 width: 100%;
118 min-height: 100vh;
119 padding-top: 50px;
120 padding-bottom: 17.5rem;
121}
122
123.main {
124 margin: 2em auto;
125 padding: 0 .75em;
126 max-width: var(--max-width);
127 line-height: 1.8;
128}
129
130.main h1,
131.main h2,
132.main h3,
133.main h4,
134.main li,
135.main pre,
136.main p {
137 margin-top: .7em;
138}
139
140.artlist li {
141 margin-top: 0;
142}
143
144.main h1 + p,
145.main h2 + p,
146.main h3 + p,
147.main h3 + p {
148 margin-top: 0;
149}
150
151ul {
152 padding-left: 2em;
153 list-style-type: disc;
154}
155
156ol {
157 padding-left: 2em;
158 list-style-type: decimal;
159}
160
161hr {
162 margin-top: .8em;
163 margin-bottom: .8em;
164}
165
166table {
167 border: 1px solid var(--c-dark);
168 border-collapse: collapse;
169}
170
171th, td {
172 margin: .2em;
173}
174
175th {
176 background-color: var(--c-bg-dark);
177 color: var(--c-light);
178}
179
180td {
181 padding: .2em .5em;
182}
183
184td:not(:first-child), th:not(:first-child) {
185 border-left: 1px solid var(--c-dark);
186}
187
188tr:nth-child(odd) {
189 background-color: var(--c-shadow);
190}
191
192/* jumbotron */
193.jumbotron {
194 position: relative;
195 width: 100%;
196 margin-top: -50px;
197 background: var(--jumbotron-bg);
198 box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
199 color: var(--jumbotron-text-color);
200 padding: 4em 0 4em 0;
201}
202
203.jindex {
204 z-index: 99;
205}
206
207.jlogo {
208 display: block;
209 margin: 25px auto;
210}
211
212.jpia {
213 position: absolute;
214 height: 40px;
215 right: 0;
216 top: 0;
217 margin: 25px;
218}
219
220@media (--max-sm) {
221 .jlogo {
222 margin: 2em auto -2em auto;
223 }
224 .jumbotron {
225 padding-bottom: 2em;
226 }
227}
228
229.child {
230 text-align: center;
231 margin: .5em auto;
232 font-size: 32px;
233 line-height: 48px;
234 max-width: 75%;
235}
236
237.box-container {
238 display: flex;
239 flex-wrap: wrap;
240 justify-content: space-around;
241 align-items: stretch;
242 max-width: var(--max-width-box);
243 margin: 0 auto;
244}
245
246.box {
247 text-align: center;
248 text-decoration: none;
249 color: var(--jumbotron-text-color);
250 margin-bottom: 5px;
251 flex-basis: 30%;
252 min-width: 26%;
253 background-color: var(--box-color);
254 border-radius: var(--box-round);
255 padding: 1em;
256}
257
258.box:hover,.box:active {
259 color: var(--jumbotron-text-color);
260 background-color: var(--box-hover-color);
261}
262
263.box span {
264 position: relative;
265 top: initial;
266 font-size: 20px;
267 font-weight: 600;
268 line-height: 16px;
269 display: block;
270 margin-top: .75em;
271}
272
273.fa-users {
274 margin-top: var(--margin-box-fa);
275}
276
277.fa-comments,.fa-question {
278 margin-bottom: var(--margin-box-fa);
279}
280
281.title {
282 text-align: center;
283}
284
285@media (--max-md) {
286 .box {
287 text-align: center;
288 }
289
290 .child {
291 font-size: 20px;
292 line-height: 30px;
293 padding: 10px 0 5px;
294 }
295
296 .fa-4x {
297 padding: 0;
298 margin: 0;
299 width: 60px;
300 text-align: center;
301 font-size: 28px;
302 }
303
304 .box-container {
305 flex-direction: column;
306 margin: 0 .5em;
307 }
308
309 .box span {
310 font-size: 22px;
311 line-height: 22px;
312 padding-left: 8px;
313 font-weight: bold;
314 position: relative;
315 display: inline-block;
316 text-align: center;
317 margin-top: 0;
318 }
319
320 .box {
321 text-align: left;
322 border-radius: calc(var(--box-round) / 2);
323 margin: 5px 0;
324 }
325}
326
327/* articles */
328h1 {
329 margin: 0;
330}
331
332.artlist ul {
333 padding: 0;
334 list-style-type: none;
335}
336
337.art-info {
338 display: flex;
339 flex-direction: row;
340 flex-wrap: wrap;
341 justify-content: space-between;
342 align-items: baseline;
343}
344
345.art-info h1 {
346 margin-top: 0;
347 display: inline;
348 margin-right: 2em;
349}
350
351.art-body {
352 margin-bottom: 1em;
353}
354
355@media(--max-sm) {
356 .artlist .heading {
357 padding: 0 0.75em;
358 }
359}
360
361.artlist ul {
362 max-width: var(--max-width);
363 margin: 2em auto;
364 margin-top: .5em;
365}
366
367.artlist li:not(:first-child) {
368 border-top: 1px solid var(--border-color);
369}
370
371.art-info .art {
372 font-weight: bold;
373 font-size: 120%;
374}
375
376.art-date {
377 display: inline-block;
378 vertical-align: baseline;
379 line-height: 1;
380 white-space: nowrap;
381 color: var(--art-date-color);
382 font-feature-settings: "tnum";
383 font-variant-numeric: tabular-nums;
384}
385
386.artlist .art-date {
387 margin-bottom: .5em;
388}
389
390.art-nav {
391 display: flex;
392 flex-direction: row;
393 justify-content: space-between;
394 flex-basis: 30%;
395 width: 100%;
396}
397
398@media (--max-md) {
399 .main.artlist {
400 padding-left: 0;
401 padding-right: 0;
402 }
403
404 .artlist .art-info {
405 padding: 0 .75em;
406 }
407}
408
409/* faq */
410.kb-index {
411 list-style-type: none;
412 padding-left: 0;
413 display: flex;
414 flex-direction: row;
415 flex-wrap: wrap;
416 justify-content: stretch;
417}
418
419.kb-index li {
420 display: block;
421 flex: 1 1 15em;
422 height: 7em;
423 margin: 1em;
424}
425
426.kb-index li h2 {
427 margin-top: 0;
428}
429
430.kb-index a {
431 display: block;
432 color: var(--text-color);
433 width: 100%;
434 height: 100%;
435}
436.kb-index a h2 {
437 color: var(--link-color);
438}
439.kb-index a:hover h2 {
440 color: var(--link-hover-color);
441}
442
443/* footer */
444.footers {
445 /*min-height: 30vh;*/
446 margin-top: -17rem;
447 min-height: 17rem;
448}
449
450.footer {
451 background: var(--jumbotron-bg);
452 color: var(--footer-text-color);
453 width: 100%;
454 box-shadow: 0 -3px 5px rgba(150,150,150,.36);
455 min-height: 15.4rem;
456 padding: 3em 0;
457}
458
459.footer .fa-fw {
460 height: 14px;
461}
462
463.footer-container {
464 display: flex;
465 flex-wrap: wrap;
466 justify-content: center;
467 align-items: flex-start;
468 margin: 0 auto;
469}
470
471.footerchild {
472 margin: 0 2em;
473 margin-top: .5em;
474 flex-grow: 1;
475 flex-shrink: 0;
476}
477
478.footerchild:last-child {
479 margin-bottom: .5em;
480}
481
482.footer-push {
483 margin-left: auto;
484 width: max-content;
485}
486
487footer a {
488 color: var(--footer-link-color);
489}
490
491footer a:hover {
492 color: var(--footer-hover-color);
493}
494
495.footer h2 {
496 margin-bottom: .1em;
497 display: inline-block;
498}
499
500.footerchild ul, .footerchild ul ul {
501 padding-left: 0;
502 margin-left: 10px;
503 margin-right: 10px;
504 list-style-type: none;
505}
506
507.footerchild ul ul {
508 padding-left: 30px;
509}
510
511@media (--max-sm) {
512 .footer-container {
513 flex-direction: column;
514 }
515
516 .footer-push {
517 margin-left: 0;
518 width: 100%;
519 }
520
521 .footerchild ul li:last-child {
522 margin-bottom: .5em;
523 }
524
525 .footer-push ul li:last-child {
526 margin-bottom: .1em;
527 }
528
529 .hdn {
530 display: none;
531 }
532 .footer {
533 padding: .5em 0;
534 }
535 .footer li a {
536 line-height: 1.8;
537 }
538 .footer-push ul {
539 display: flex;
540 flex-wrap: wrap;
541 flex-direction: row;
542 justify-content: space-between;
543 align-items: flex-start;
544 text-align: center;
545 }
546 .footer-push ul li {
547 display: inline-block;
548 font-size: 2.5rem;
549 }
550 .footerchild ul li img,
551 .footerchild ul li .fa-fw {
552 height: 2.5rem;
553 }
554}
555
556.footer h2, .footer h3 {
557 margin-left: 10px;
558 margin-right: 10px;
559}
560
561footer.copyright {
562 display: flex;
563 flex-wrap: wrap;
564 justify-content: space-between;
565 background: var(--copyright-bg);
566 min-height: 1.5rem;
567 color: var(--copyright-text-color);
568 padding-left: .5em;
569 padding-right: .5em;
570 overflow: hidden;
571}
572
573footer.copyright div {
574 display: flex;
575 align-items: center;
576 height: 1.6rem;
577 line-height: 1.6rem;
578 vertical-align: top;
579}
580
581.copyright * {
582 margin: 0;
583 height: 1.6rem;
584 line-height: 1.6rem;
585}
586
587.copyright .fa {
588 height: 100%;
589 vertical-align: top;
590 font-size: 1.4em;
591}
592
593.copyright .footer-link {
594 height: 28px;
595 margin-right: .5em;
596}
597
598.copyright img {
599 height: 1.5rem;
600 width: auto;
601}