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 | .formatted-file-content pre { |
137 | border: 1px solid #ddd; |
138 | box-shadow: 1px 1px 0 #eee; |
139 | overflow: auto; |
140 | } |
141 | |
142 | .formatted-file-content h1 { |
143 | text-align: left; |
144 | border-bottom: 1px solid #ddd; |
145 | } |
146 | |
147 | .formatted-file-content h2 { |
148 | border-bottom: 1px solid #ddd; |
149 | } |
150 | |
151 | article.formatted-file-content { |
152 | font-family: inherit; |
153 | font-size: 0.85em; |
154 | line-height: inherit; |
155 | padding: 1em 5em; |
156 | } |
157 | |
158 | table { |
159 | background: var(--white); |
160 | border-collapse: collapse; |
161 | width: 100%; |
162 | border: 1px solid var(--gray); |
163 | margin-bottom: 1em; |
164 | } |
165 | |
166 | tbody tr { |
167 | transition-duration: 300ms; |
168 | } |
169 | |
170 | tbody tr:hover { |
171 | background: var(--lightblue); |
172 | } |
173 | |
174 | td { |
175 | padding: 0.5em; |
176 | } |
177 | |
178 | table.file-diff, table.file-content { |
179 | margin-bottom: 1em; |
180 | user-select: none; |
181 | } |
182 | |
183 | table.file-diff td, table.file-content td { |
184 | padding: 0; |
185 | line-height: 1em; |
186 | } |
187 | |
188 | table.file-diff .hunk-delim { |
189 | background: #fafafa; |
190 | border-bottom: 1px solid var(--darkerwhite); |
191 | border-top: 1px solid var(--darkerwhite); |
192 | text-align: center; |
193 | } |
194 | |
195 | table.file-diff .hunk-delim td { |
196 | padding: 0.25em; |
197 | } |
198 | |
199 | table.file-diff .diff-no-data { |
200 | background: var(--darkerwhite); |
201 | } |
202 | |
203 | table.file-diff .diff-no-data td { |
204 | padding: 1em; |
205 | user-select: text; |
206 | text-align: center; |
207 | } |
208 | |
209 | table.file-diff td:nth-child(3) { |
210 | font-family: monospace; |
211 | text-align: center; |
212 | } |
213 | |
214 | table.file-diff .diff-line-num, table.file-content .content-line-num { |
215 | background: var(--darkerwhite); |
216 | color: var(--lighterblack); |
217 | font-family: monospace; |
218 | text-align: center; |
219 | border-right: 1px solid var(--gray); |
220 | border-left: 1px solid var(--gray); |
221 | } |
222 | |
223 | table.file-diff .diff-line, table.file-content .content-line { |
224 | border-right: 1px solid var(--gray); |
225 | user-select: text; |
226 | } |
227 | |
228 | table.file-diff pre, table.file-content pre { |
229 | border: none; |
230 | background: none; |
231 | } |
232 | |
233 | table.file-diff .diff-minus, |
234 | table.file-diff .diff-minus:hover { |
235 | background: var(--lighterred); |
236 | border-color: var(--red); |
237 | } |
238 | |
239 | table.file-diff .diff-plus, |
240 | table.file-diff .diff-plus:hover{ |
241 | background: var(--lightergreen); |
242 | } |
243 | |
244 | table.file-diff tr:hover, table.file-content tr:hover { |
245 | background: none; |
246 | } |
247 | |
248 | table.file-diff .diff-minus .diff-line-num { |
249 | background: var(--lightred); |
250 | } |
251 | |
252 | table.file-diff .diff-plus .diff-line-num { |
253 | background: var(--lightgreen); |
254 | } |
255 | |
256 | table.file-diff .diff-minus td { |
257 | border-color: var(--borderred); |
258 | } |
259 | |
260 | table.file-diff .diff-plus td { |
261 | border-color: var(--bordergreen); |
262 | } |
263 | |
264 | p.diff-file-name { |
265 | background: #cccac5; |
266 | margin: 0; |
267 | padding: 0.5em; |
268 | border: 1px solid var(--gray); |
269 | border-bottom: none; |
270 | } |
271 | |
272 | .commit-info, .tag-box { |
273 | border: 1px solid var(--gray); |
274 | margin-top: 1em; |
275 | margin-bottom: 1em; |
276 | padding: 1em; |
277 | display: flex; |
278 | flex-direction: row; |
279 | justify-content: center; |
280 | align-content: center; |
281 | background: var(--white); |
282 | } |
283 | |
284 | .commit-info .commit, .tag-box .tag { |
285 | flex: 1 |
286 | } |
287 | |
288 | .commit-info .message, .tag-box .tag-name { |
289 | font-weight: bold; |
290 | } |
291 | |
292 | .commit-info .author, .commit-info .date, .tag-box .date { |
293 | display: inline-block; |
294 | padding: 0.5em 0; |
295 | } |
296 | |
297 | .tag-box .tag p { |
298 | margin: 0; |
299 | } |
300 | |
301 | .tag-box img { |
302 | margin-right: 0.5em; |
303 | } |
304 | |
305 | .commit-info img { |
306 | max-width: 64px; |
307 | max-height: 64px; |
308 | margin-right: 1em; |
309 | } |
310 | |
311 | .commit-info .commit-id { |
312 | margin-left: 1em; |
313 | border: 1px solid var(--gray); |
314 | border-radius: 10px; |
315 | padding: 0; |
316 | background: var(--darkerwhite); |
317 | height: 2.5em; |
318 | display: flex; |
319 | flex-direction: row; |
320 | align-items: center; |
321 | } |
322 | |
323 | .commit-info .commit-id .short-id { |
324 | background: var(--darkwhite); |
325 | display: inline-block; |
326 | padding: 0.5em; |
327 | border-bottom-left-radius: 10px; |
328 | border-top-left-radius: 10px; |
329 | border-right: 1px solid var(--gray); |
330 | font-family: monospace, monospace; |
331 | font-size: 0.85em; |
332 | } |
333 | |
334 | .commit-info p { |
335 | margin: 0; |
336 | } |
337 | |
338 | .commit-info .commit-id button { |
339 | background: none; |
340 | border: none; |
341 | cursor: pointer; |
342 | } |
343 | |
344 | .commit-info .commit-id img { |
345 | max-width: 1.5em; |
346 | max-height: 1.5em; |
347 | margin-right: 0.3em; |
348 | } |
349 | |
350 | .commit-info .date, .tag-box .date { |
351 | font-style: italic; |
352 | margin-left: 1em; |
353 | } |
354 | |
355 | .commit-info .author::before, .tag-box .author::before { |
356 | content: "Authored by: "; |
357 | } |
358 | |
359 | h1 { |
360 | text-align: center; |
361 | } |
362 | |
363 | code { |
364 | background: var(--darkerwhite); |
365 | display: inline-block; |
366 | padding: 3px; |
367 | font-family: monospace, monospace; |
368 | font-size: 0.85em; |
369 | } |
370 | |
371 | .formatted-file-content pre code { |
372 | font-size: inherit; |
373 | font-family: inherit; |
374 | padding: 0; |
375 | background: none; |
376 | display: block; |
377 | } |
378 | |
379 | .formatted-file-content code { |
380 | background: none; |
381 | padding: 0; |
382 | display: inline; |
383 | } |
384 | |
385 | .clone { |
386 | text-align: right; |
387 | } |
388 | |
389 | .icon-link { |
390 | display: flex; |
391 | flex-direction: row; |
392 | align-content: center; |
393 | } |
394 | |
395 | .icon-link img { |
396 | height: 1em; |
397 | width: 1em; |
398 | margin-right: 0.3em; |
399 | } |
400 | |
401 | .path-box a { |
402 | display: inline-block; |
403 | padding: 0.5em; |
404 | } |
405 | |
406 | .button-row a { |
407 | display: inline-block; |
408 | background: var(--white); |
409 | padding: 0.5em; |
410 | border: 1px solid var(--gray); |
411 | margin: 0.5em; |
412 | } |
413 | |
414 | |
415 | /* syntax highlighting */ |
416 | .syntax-comment { |
417 | color: var(--comment); |
418 | } |
419 | |
420 | .syntax-string { |
421 | color: var(--string); |
422 | } |
423 | |
424 | /* for scheme */ |
425 | .syntax-special { |
426 | color: var(--keyword2); |
427 | font-weight: bold; |
428 | } |
429 | |
430 | .syntax-keyword { |
431 | color: var(--keyword); |
432 | font-weight: bold; |
433 | } |
434 | |
435 | @media screen and (max-width: 1250px) { |
436 | #content { |
437 | width: 100%; |
438 | padding: 0; |
439 | } |
440 | article.formatted-file-content { |
441 | padding: 0.25em; |
442 | } |
443 | } |
444 |