gitile.css
1 | /* |
2 | * SPDX-FileCopyrightText: 2020, 2021 Julien Lepiller <julien@lepiller.eu> |
3 | * |
4 | * SPDX-License-Identifier: CC0-1.0 |
5 | */ |
6 | |
7 | :root { |
8 | /* header colors */ |
9 | --blue: #6eaee6; |
10 | --darkblue: #176ecb; |
11 | --lightblue: #a1d9f4; |
12 | --top-link-white: #fff; |
13 | |
14 | /* footer */ |
15 | --darkgreen: #2cae0e; |
16 | |
17 | /* elements */ |
18 | --white: #fff; |
19 | --darkwhite: #faf5f0; |
20 | --darkerwhite: #eae5e0; |
21 | --gray: #ccc; |
22 | --lighterblack: #777; |
23 | --black: #333; |
24 | |
25 | /* diffs */ |
26 | --lightgreen: #ddfbe6; |
27 | --lightergreen: #ecfdf0; |
28 | --bordergreen: #b0eab9; |
29 | |
30 | --lightred: #f9d7dc; |
31 | --lighterred: #fbe9eb; |
32 | --borderred: #eac0c9; |
33 | |
34 | --hunk-delim: #fafafa; |
35 | --diff-name-background: #cccac5; |
36 | |
37 | /* code blocks in readme */ |
38 | --code-color: #353; |
39 | --code-background: #ded; |
40 | --code-shadow: #efe; |
41 | --code-border: #bdb; |
42 | --pre-shadow: #efe; |
43 | --pre-border: #bdb; |
44 | } |
45 | |
46 | @media screen and (prefers-color-scheme: dark) { |
47 | :root { |
48 | --blue: #0e2e46; |
49 | --darkblue: #1e3e56; |
50 | --lightblue: #073766; |
51 | --top-link-white: #d0daff; |
52 | |
53 | --darkgreen: #2cae0e; |
54 | |
55 | --white: #000; |
56 | --darkwhite: #110d0a; |
57 | --darkerwhite: #151311; |
58 | --gray: #333; |
59 | --lighterblack: #777; |
60 | --black: #ddd; |
61 | |
62 | --lightgreen: #0d2b16; |
63 | --lightergreen: #0c1d10; |
64 | --bordergreen: #304a39; |
65 | |
66 | --lightred: #29070c; |
67 | --lighterred: #1b090b; |
68 | --borderred: #4a3039; |
69 | |
70 | --hunk-delim: #0a0a0a; |
71 | --diff-name-background: #3c3a35; |
72 | |
73 | --code-color: #ded; |
74 | --code-background: #111511; |
75 | --code-shadow: #010; |
76 | --code-border: #343; |
77 | --pre-shadow: #232; |
78 | --pre-border: #343; |
79 | } |
80 | |
81 | a { |
82 | color: #81b9e4; |
83 | } |
84 | } |
85 | |
86 | html, body { |
87 | margin: 0; |
88 | padding: 0; |
89 | min-height: 100%; |
90 | background: var(--darkwhite); |
91 | } |
92 | |
93 | body { |
94 | display: flex; |
95 | flex-direction: column; |
96 | color: var(--black); |
97 | height: 100%; |
98 | } |
99 | |
100 | #content { |
101 | flex: 1; |
102 | width: 1200px; |
103 | margin: auto; |
104 | text-align: justify; |
105 | line-height: 1.25em; |
106 | padding: 2em; |
107 | } |
108 | |
109 | header { |
110 | background: var(--blue); |
111 | } |
112 | |
113 | footer { |
114 | background: var(--darkerwhite); |
115 | } |
116 | |
117 | header, footer { |
118 | text-align: center; |
119 | } |
120 | |
121 | a { |
122 | text-decoration: none; |
123 | } |
124 | |
125 | header ul { |
126 | list-style: none; |
127 | margin: 0; |
128 | } |
129 | |
130 | header li { |
131 | display: inline-block; |
132 | } |
133 | |
134 | header li a { |
135 | display: inline-block; |
136 | padding: 1em; |
137 | color: var(--top-link-white); |
138 | } |
139 | |
140 | header li a:hover { |
141 | background-color: var(--darkblue); |
142 | } |
143 | |
144 | header li.first { |
145 | margin-right: 2em; |
146 | } |
147 | |
148 | footer a { |
149 | color: var(--darkgreen); |
150 | } |
151 | |
152 | .content { |
153 | display: flex; |
154 | flex-direction: row; |
155 | align-items: center; |
156 | } |
157 | |
158 | .content p:first-child { |
159 | flex: 1; |
160 | } |
161 | |
162 | .content img { |
163 | max-height: 1.5em; |
164 | max-width: 1.5em; |
165 | } |
166 | |
167 | .content p { |
168 | margin: 0; |
169 | } |
170 | |
171 | .content, thead { |
172 | background: var(--darkerwhite); |
173 | padding: 0.5em; |
174 | margin: 0; |
175 | border: 1px solid var(--gray); |
176 | border-bottom: none; |
177 | } |
178 | |
179 | pre, article.formatted-file-content { |
180 | border: 1px solid var(--gray); |
181 | border-top: none; |
182 | padding: 0.5em; |
183 | margin: 0; |
184 | background: var(--white); |
185 | line-height: 1em; |
186 | font-family: monospace, monospace; |
187 | } |
188 | |
189 | pre { |
190 | font-size: 0.85em; |
191 | } |
192 | |
193 | article.formatted-file-content > * { |
194 | margin-left: auto; |
195 | margin-right: auto; |
196 | font-family: noto sans, sans serif; |
197 | font-size: 1.05em; |
198 | } |
199 | |
200 | .formatted-file-content ul { |
201 | padding-left: 1em; |
202 | } |
203 | |
204 | .formatted-file-content pre { |
205 | border: 1px solid var(--pre-border); |
206 | box-shadow: 1px 1px 0 var(--pre-shadow); |
207 | overflow: auto; |
208 | font-family: noto mono, mono; |
209 | font-size: inherit; |
210 | color: #353; |
211 | } |
212 | |
213 | .formatted-file-content h1 { |
214 | text-align: left; |
215 | font-size: 1.9em; |
216 | padding-bottom: 0.3em; |
217 | border-bottom: 1px solid #ddd; |
218 | } |
219 | |
220 | .formatted-file-content h2 { |
221 | padding-bottom: 0.2em; |
222 | border-bottom: 1px solid #ddd; |
223 | } |
224 | |
225 | article.formatted-file-content { |
226 | font-family: inherit; |
227 | line-height: inherit; |
228 | padding: 1em 5em; |
229 | } |
230 | |
231 | table { |
232 | background: var(--white); |
233 | border-collapse: collapse; |
234 | width: 100%; |
235 | border: 1px solid var(--gray); |
236 | margin-bottom: 1em; |
237 | } |
238 | |
239 | tbody tr { |
240 | transition-duration: 300ms; |
241 | } |
242 | |
243 | tbody tr:hover { |
244 | background: var(--lightblue); |
245 | } |
246 | |
247 | td { |
248 | padding: 0.5em; |
249 | } |
250 | |
251 | table.file-diff, table.file-content { |
252 | margin-bottom: 1em; |
253 | user-select: none; |
254 | } |
255 | |
256 | table.file-diff td, table.file-content td { |
257 | padding: 0; |
258 | line-height: 1em; |
259 | } |
260 | |
261 | table.file-diff td:target + td, table.file-content td:target + td { |
262 | background: #ffffd0; |
263 | } |
264 | |
265 | table.file-diff .hunk-delim { |
266 | background: var(--hunk-delim); |
267 | border-bottom: 1px solid var(--darkerwhite); |
268 | border-top: 1px solid var(--darkerwhite); |
269 | text-align: center; |
270 | } |
271 | |
272 | table.file-diff .hunk-delim td { |
273 | padding: 0.25em; |
274 | } |
275 | |
276 | table.file-diff .diff-no-data { |
277 | background: var(--darkerwhite); |
278 | } |
279 | |
280 | table.file-diff .diff-no-data td { |
281 | padding: 1em; |
282 | user-select: text; |
283 | text-align: center; |
284 | } |
285 | |
286 | table.file-diff td:nth-child(3) { |
287 | font-family: monospace; |
288 | text-align: center; |
289 | } |
290 | |
291 | table.file-diff .diff-line-num, table.file-content .content-line-num { |
292 | background: var(--darkerwhite); |
293 | color: var(--lighterblack); |
294 | font-family: monospace; |
295 | text-align: center; |
296 | border-right: 1px solid var(--gray); |
297 | border-left: 1px solid var(--gray); |
298 | } |
299 | |
300 | table.file-diff .diff-line, table.file-content .content-line { |
301 | border-right: 1px solid var(--gray); |
302 | user-select: text; |
303 | } |
304 | |
305 | table.file-diff pre, table.file-content pre { |
306 | border: none; |
307 | background: none; |
308 | padding: 0.2em; |
309 | } |
310 | |
311 | table.file-diff .diff-minus, |
312 | table.file-diff .diff-minus:hover { |
313 | background: var(--lighterred); |
314 | border-color: var(--red); |
315 | } |
316 | |
317 | table.file-diff .diff-plus, |
318 | table.file-diff .diff-plus:hover{ |
319 | background: var(--lightergreen); |
320 | } |
321 | |
322 | table.file-diff tr:hover, table.file-content tr:hover { |
323 | background: none; |
324 | } |
325 | |
326 | table.file-diff .diff-minus .diff-line-num { |
327 | background: var(--lightred); |
328 | } |
329 | |
330 | table.file-diff .diff-plus .diff-line-num { |
331 | background: var(--lightgreen); |
332 | } |
333 | |
334 | table.file-diff .diff-minus td { |
335 | border-color: var(--borderred); |
336 | } |
337 | |
338 | table.file-diff .diff-plus td { |
339 | border-color: var(--bordergreen); |
340 | } |
341 | |
342 | p.diff-file-name { |
343 | background: var(--diff-name-background); |
344 | margin: 0; |
345 | padding: 0.5em; |
346 | border: 1px solid var(--gray); |
347 | border-bottom: none; |
348 | } |
349 | |
350 | .commit-info, .tag-box { |
351 | border: 1px solid var(--gray); |
352 | margin-top: 1em; |
353 | margin-bottom: 1em; |
354 | padding: 1em; |
355 | display: flex; |
356 | flex-direction: row; |
357 | justify-content: center; |
358 | align-content: center; |
359 | background: var(--white); |
360 | } |
361 | |
362 | .commit-info .commit, .tag-box .tag { |
363 | flex: 1 |
364 | } |
365 | |
366 | .commit-info .message, .tag-box .tag-name { |
367 | font-weight: bold; |
368 | } |
369 | |
370 | .commit-info .author, .commit-info .date, .tag-box .date { |
371 | display: inline-block; |
372 | padding: 0.5em 0; |
373 | } |
374 | |
375 | .tag-box .tag p { |
376 | margin: 0; |
377 | } |
378 | |
379 | .tag-box img { |
380 | margin-right: 0.5em; |
381 | } |
382 | |
383 | .commit-info img { |
384 | max-width: 64px; |
385 | max-height: 64px; |
386 | margin-right: 1em; |
387 | } |
388 | |
389 | .commit-info .commit-id { |
390 | margin-left: 1em; |
391 | border: 1px solid var(--gray); |
392 | border-radius: 10px; |
393 | padding: 0; |
394 | background: var(--darkerwhite); |
395 | height: 2.5em; |
396 | display: flex; |
397 | flex-direction: row; |
398 | align-items: stretch; |
399 | overflow: hidden; |
400 | } |
401 | |
402 | .commit-info .commit-id .short-id { |
403 | background: var(--darkwhite); |
404 | display: inline-block; |
405 | padding: 0 0.5em; |
406 | border-right: 1px solid var(--gray); |
407 | font-family: monospace, monospace; |
408 | font-size: 0.85em; |
409 | display: flex; |
410 | align-items: center; |
411 | } |
412 | |
413 | .commit-info p { |
414 | margin: 0; |
415 | } |
416 | |
417 | .commit-info .commit-id button { |
418 | background: none; |
419 | border: none; |
420 | cursor: pointer; |
421 | } |
422 | |
423 | .commit-info .commit-id img { |
424 | max-width: 1.5em; |
425 | max-height: 1.5em; |
426 | margin-right: 0.3em; |
427 | } |
428 | |
429 | .commit-info .commit-id a { |
430 | display: flex; |
431 | align-items: center; |
432 | } |
433 | |
434 | .commit-info .date, .tag-box .date { |
435 | font-style: italic; |
436 | margin-left: 1em; |
437 | } |
438 | |
439 | .commit-info .author::before, .tag-box .author::before { |
440 | content: "Authored by: "; |
441 | } |
442 | |
443 | h1 { |
444 | text-align: center; |
445 | } |
446 | |
447 | code { |
448 | background: var(--darkerwhite); |
449 | display: inline-block; |
450 | padding: 3px; |
451 | font-family: monospace, monospace; |
452 | font-size: 0.85em; |
453 | } |
454 | |
455 | .formatted-file-content pre code { |
456 | font-size: inherit; |
457 | font-family: inherit; |
458 | padding: 0; |
459 | background: none; |
460 | box-shadow: none; |
461 | display: block; |
462 | color: var(--black); |
463 | } |
464 | |
465 | .formatted-file-content code { |
466 | background: var(--code-background); |
467 | padding: 0.15em; |
468 | display: inline-block; |
469 | border-radius: 5px; |
470 | box-shadow: 1px 1px 1px var(--code-shadow); |
471 | color: var(--code-color); |
472 | } |
473 | |
474 | .clone { |
475 | text-align: right; |
476 | } |
477 | |
478 | .icon-link { |
479 | display: flex; |
480 | flex-direction: row; |
481 | align-content: center; |
482 | } |
483 | |
484 | .icon-link img { |
485 | height: 1em; |
486 | width: 1em; |
487 | margin-right: 0.3em; |
488 | } |
489 | |
490 | .path-box a { |
491 | display: inline-block; |
492 | padding: 0.5em; |
493 | } |
494 | |
495 | .button-row a { |
496 | display: inline-block; |
497 | background: var(--white); |
498 | padding: 0.5em; |
499 | border: 1px solid var(--gray); |
500 | margin: 0.5em; |
501 | } |
502 | |
503 | |
504 | /* syntax highlighting */ |
505 | .syntax-comment { |
506 | color: var(--comment); |
507 | } |
508 | |
509 | .syntax-string { |
510 | color: var(--string); |
511 | } |
512 | |
513 | /* for scheme */ |
514 | .syntax-special { |
515 | color: var(--keyword2); |
516 | font-weight: bold; |
517 | } |
518 | |
519 | .syntax-keyword { |
520 | color: var(--keyword); |
521 | font-weight: bold; |
522 | } |
523 | |
524 | @media screen and (max-width: 1250px) { |
525 | #content { |
526 | width: 100%; |
527 | padding: 0; |
528 | } |
529 | article.formatted-file-content { |
530 | padding: 0.25em; |
531 | } |
532 | } |
533 |