gitile/assets/css/gitile.css

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 td:target + td, table.file-content td:target + td {
198
  background: #ffffd0;
199
}
200
201
table.file-diff .hunk-delim {
202
  background: #fafafa;
203
  border-bottom: 1px solid var(--darkerwhite);
204
  border-top: 1px solid var(--darkerwhite);
205
  text-align: center;
206
}
207
208
table.file-diff .hunk-delim td {
209
  padding: 0.25em;
210
}
211
212
table.file-diff .diff-no-data {
213
  background: var(--darkerwhite);
214
}
215
216
table.file-diff .diff-no-data td {
217
  padding: 1em;
218
  user-select: text;
219
  text-align: center;
220
}
221
222
table.file-diff td:nth-child(3) {
223
  font-family: monospace;
224
  text-align: center;
225
}
226
227
table.file-diff .diff-line-num, table.file-content .content-line-num {
228
  background: var(--darkerwhite);
229
  color: var(--lighterblack);
230
  font-family: monospace;
231
  text-align: center;
232
  border-right: 1px solid var(--gray);
233
  border-left: 1px solid var(--gray);
234
}
235
236
table.file-diff .diff-line, table.file-content .content-line {
237
  border-right: 1px solid var(--gray);
238
  user-select: text;
239
}
240
241
table.file-diff pre, table.file-content pre {
242
  border: none;
243
  background: none;
244
  padding: 0.2em;
245
}
246
247
table.file-diff .diff-minus,
248
table.file-diff .diff-minus:hover {
249
  background: var(--lighterred);
250
  border-color: var(--red);
251
}
252
253
table.file-diff .diff-plus,
254
table.file-diff .diff-plus:hover{
255
  background: var(--lightergreen);
256
}
257
258
table.file-diff tr:hover, table.file-content tr:hover {
259
  background: none;
260
}
261
262
table.file-diff .diff-minus .diff-line-num {
263
  background: var(--lightred);
264
}
265
266
table.file-diff .diff-plus .diff-line-num {
267
  background: var(--lightgreen);
268
}
269
270
table.file-diff .diff-minus td {
271
  border-color: var(--borderred);
272
}
273
274
table.file-diff .diff-plus td {
275
  border-color: var(--bordergreen);
276
}
277
278
p.diff-file-name {
279
  background: #cccac5;
280
  margin: 0;
281
  padding: 0.5em;
282
  border: 1px solid var(--gray);
283
  border-bottom: none;
284
}
285
286
.commit-info, .tag-box {
287
  border: 1px solid var(--gray);
288
  margin-top: 1em;
289
  margin-bottom: 1em;
290
  padding: 1em;
291
  display: flex;
292
  flex-direction: row;
293
  justify-content: center;
294
  align-content: center;
295
  background: var(--white);
296
}
297
298
.commit-info .commit, .tag-box .tag {
299
  flex: 1
300
}
301
302
.commit-info .message, .tag-box .tag-name {
303
  font-weight: bold;
304
}
305
306
.commit-info .author, .commit-info .date, .tag-box .date {
307
  display: inline-block;
308
  padding: 0.5em 0;
309
}
310
311
.tag-box .tag p {
312
  margin: 0;
313
}
314
315
.tag-box img {
316
  margin-right: 0.5em;
317
}
318
319
.commit-info img {
320
  max-width: 64px;
321
  max-height: 64px;
322
  margin-right: 1em;
323
}
324
325
.commit-info .commit-id {
326
  margin-left: 1em;
327
  border: 1px solid var(--gray);
328
  border-radius: 10px;
329
  padding: 0;
330
  background: var(--darkerwhite);
331
  height: 2.5em;
332
  display: flex;
333
  flex-direction: row;
334
  align-items: stretch;
335
  overflow: hidden;
336
}
337
338
.commit-info .commit-id .short-id {
339
  background: var(--darkwhite);
340
  display: inline-block;
341
  padding: 0 0.5em;
342
  border-right: 1px solid var(--gray);
343
  font-family: monospace, monospace;
344
  font-size: 0.85em;
345
  display: flex;
346
  align-items: center;
347
}
348
349
.commit-info p {
350
  margin: 0;
351
}
352
353
.commit-info .commit-id button {
354
  background: none;
355
  border: none;
356
  cursor: pointer;
357
}
358
359
.commit-info .commit-id img {
360
  max-width: 1.5em;
361
  max-height: 1.5em;
362
  margin-right: 0.3em;
363
}
364
365
.commit-info .commit-id a {
366
  display: flex;
367
  align-items: center;
368
}
369
370
.commit-info .date, .tag-box .date {
371
  font-style: italic;
372
  margin-left: 1em;
373
}
374
375
.commit-info .author::before, .tag-box .author::before {
376
  content: "Authored by: ";
377
}
378
379
h1 {
380
  text-align: center;
381
}
382
383
code {
384
  background: var(--darkerwhite);
385
  display: inline-block;
386
  padding: 3px;
387
  font-family: monospace, monospace;
388
  font-size: 0.85em;
389
}
390
391
.formatted-file-content pre code {
392
  font-size: inherit;
393
  font-family: inherit;
394
  padding: 0;
395
  background: none;
396
  display: block;
397
}
398
399
.formatted-file-content code {
400
  background: none;
401
  padding: 0;
402
  display: inline;
403
}
404
405
.clone {
406
  text-align: right;
407
}
408
409
.icon-link {
410
  display: flex;
411
  flex-direction: row;
412
  align-content: center;
413
}
414
415
.icon-link img {
416
  height: 1em;
417
  width: 1em;
418
  margin-right: 0.3em;
419
}
420
421
.path-box a {
422
  display: inline-block;
423
  padding: 0.5em;
424
}
425
426
.button-row a {
427
  display: inline-block;
428
  background: var(--white);
429
  padding: 0.5em;
430
  border: 1px solid var(--gray);
431
  margin: 0.5em;
432
}
433
434
435
/* syntax highlighting */
436
.syntax-comment {
437
  color: var(--comment);
438
}
439
440
.syntax-string {
441
  color: var(--string);
442
}
443
444
/* for scheme */
445
.syntax-special {
446
  color: var(--keyword2);
447
  font-weight: bold;
448
}
449
450
.syntax-keyword {
451
  color: var(--keyword);
452
  font-weight: bold;
453
}
454
455
@media screen and (max-width: 1250px) { 
456
  #content {
457
    width: 100%;
458
    padding: 0;
459
  }
460
  article.formatted-file-content {
461
    padding: 0.25em;
462
  }
463
}
464