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