all repos

mugit @ 6309169

🐮 git server that your cow will love

mugit/web/static/style.css (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
ui: highlight selected line, 2 months ago
1
:root {
2
  --white: #fff;
3
  --light: #f4f4f4;
4
  --cyan: #509c93;
5
  --light-gray: #eee;
6
  --medium-gray: #ddd;
7
  --gray: #6a6a6a;
8
  --dark: #444;
9
  --darker: #222;
10
  --diff-add: green;
11
  --diff-del: red;
12
13
  --sans-font: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif;
14
  --mono-font: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', 'Roboto Mono', Menlo, Consolas, monospace;
15
}
16
17
@media (prefers-color-scheme: dark) {
18
  :root {
19
    color-scheme: dark light;
20
    --light: #181818;
21
    --cyan: #76c7c0;
22
    --light-gray: #333;
23
    --medium-gray: #444;
24
    --gray: #aaa;
25
    --dark: #ddd;
26
    --darker: #f4f4f4;
27
    --white: #000;
28
  }
29
}
30
31
* {
32
  box-sizing: border-box;
33
  padding: 0;
34
  margin: 0;
35
}
36
37
html {
38
  background: var(--white);
39
  -webkit-text-size-adjust: none;
40
  -webkit-font-smoothing: antialiased;
41
  -moz-osx-font-smoothing: grayscale;
42
  font-family: var(--sans-font);
43
  font-weight: 400;
44
}
45
46
body {
47
  max-width: 1200px;
48
  padding: 0 13px;
49
  margin: 40px auto;
50
}
51
52
::selection {
53
  background: var(--medium-gray);
54
}
55
56
a {
57
  text-decoration: none;
58
  word-wrap: break-word;
59
  color: var(--darker);
60
  border-bottom: 0;
61
}
62
63
a:hover { border-bottom: 1.5px solid var(--gray); }
64
.link { border-bottom: 1.5px solid var(--medium-gray); }
65
66
pre {
67
  font-family: var(--mono-font);
68
  overflow-x: auto;
69
  tab-size: 4;
70
  -moz-tab-size: 4;
71
}
72
73
main, footer {
74
  padding: 0;
75
  line-height: 160%;
76
}
77
78
nav { padding: 0.4rem 0 1.5rem 0; }
79
nav ul {
80
  list-style: none;
81
  padding-bottom: 20px;
82
}
83
84
nav ul li {
85
  padding-right: 10px;
86
  display: inline-block;
87
}
88
89
/* utilities */
90
.nowrap { white-space: nowrap; }
91
.fill { width: 100%; }
92
.muted { color: var(--gray); }
93
.padtop { padding-top: 20px; }
94
95
.center {
96
  display: flex;
97
  justify-content: center;
98
}
99
100
.size { text-align: right; }
101
102
.mode, .size,
103
.commit-hash, .commit-email,
104
.diff-type { font-family: var(--mono-font); }
105
106
.mb { margin-bottom: 1rem; }
107
108
/* tables */
109
.table {
110
  width: 100%;
111
  border-collapse: collapse;
112
  table-layout: auto;
113
}
114
115
.table th {
116
  text-align: left;
117
  font-weight: 500;
118
  border-bottom: 1.5px solid var(--medium-gray);
119
  padding: 0.25em 0.5em;
120
}
121
122
.table td {
123
  border-bottom: 1px solid var(--light-gray);
124
  padding: 0.25em 0.5em;
125
  vertical-align: top;
126
}
127
128
.table tbody tr:hover { background: var(--light); }
129
.table tbody tr.nohover:hover { background: transparent; }
130
131
/* tooltip */
132
.tooltip {
133
  display: none;
134
  position: absolute;
135
  left: 0;
136
  top: 100%;
137
  margin-top: 0.25rem;
138
  padding: 0.5rem 0.7rem;
139
  background: var(--white);
140
  border: 1px solid var(--medium-gray);
141
  border-radius: 4px;
142
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
143
  z-index: 10;
144
  font-size: 0.85em;
145
  line-height: 1.3;
146
  max-width: 48ch;
147
  white-space: nowrap;
148
}
149
150
.author, .age { position: relative; }
151
152
.author:hover .tooltip,
153
.author:focus-within .tooltip,
154
.age:hover .tooltip,
155
.age:focus-within .tooltip {
156
  display: block;
157
}
158
159
/* box */
160
.box {
161
  background: var(--light-gray);
162
  padding: 0.6rem;
163
}
164
165
.box + .box {
166
  margin-top: 0.8rem;
167
}
168
169
/* repo header */
170
.repo-header { margin-bottom: 1.25rem; }
171
172
.repo-breadcrumb,
173
.repo-breadcrumb a {
174
  color: var(--gray);
175
}
176
177
.repo-breadcrumb:before { content: "<"; }
178
179
.repo-name {
180
  font-size: 1.6rem;
181
  line-height: 1.1;
182
  margin-top: 0.25rem;
183
}
184
185
.repo-header .desc { margin-top: 0.35rem; }
186
.repo-header .repo-nav { padding: 0.5rem 0 0 0; }
187
.repo-header .repo-nav ul { padding-bottom: 0; }
188
189
/* index page */
190
.index { margin-top: 2em; }
191
192
/* repo index */
193
.repo-index {
194
  display: flex;
195
  gap: 1.25rem;
196
  align-items: flex-start;
197
}
198
199
.repo-index-main { flex: 0 0 72ch; }
200
.repo-index-main .box { width: 100%; }
201
.repo-index-side {
202
  flex: 0 0 26rem;
203
  min-width: 0;
204
}
205
206
.repo-index-side h2 {
207
  font-size: 1.4rem;
208
  padding: 0;
209
}
210
211
/* log page */
212
.log td.author .author-short {
213
  display: inline-block;
214
  max-width: 25ch;
215
  overflow: hidden;
216
  text-overflow: ellipsis;
217
  vertical-align: top;
218
}
219
220
/* tree */
221
.tree, .log, .repo-index { margin-bottom: 2em; }
222
223
/* file View */
224
.file-wrapper {
225
  display: flex;
226
  flex-direction: row;
227
  gap: 1rem;
228
  padding: 0 0.5rem;
229
  background: var(--light-gray);
230
  overflow-x: auto;
231
}
232
233
.file-contents {
234
  width: 100%;
235
  padding: 0.3em 0 0.3em 0;
236
}
237
238
.line-number {
239
  width: 1%;
240
  -moz-user-select: -moz-none;
241
  -khtml-user-select: none;
242
  -webkit-user-select: none;
243
  -o-user-select: none;
244
}
245
246
.line-number a:hover { border-bottom: none; }
247
.line-number a {
248
    display: block;
249
    padding: 0 1rem;
250
    text-decoration: none;
251
}
252
253
.line:has(a:target) { background-color: rgba(0,0,0,0.4); }
254
255
.image-viewer, .binary-viewer { padding: 1rem 0; }
256
.image-viewer img {
257
  max-width: 100%;
258
  height: auto;
259
}
260
261
/* commit */
262
.commit { margin-bottom: 1rem; }
263
264
.commit pre {
265
  padding-bottom: 0;
266
  white-space: pre-wrap;
267
}
268
269
.commit .box { margin-bottom: 0.25rem; }
270
.commit .commit-info {
271
  padding-bottom: 0.25rem;
272
}
273
274
.commit-message {
275
  margin-top: 0.25rem;
276
  font-size: 1rem;
277
  line-height: 1.35;
278
  margin-bottom: 1rem;
279
}
280
281
.commit-info {
282
  color: var(--gray);
283
  font-size: 0.85rem;
284
}
285
286
.commit-date { float: right; }
287
288
.commit-email:before { content: '<'; }
289
.commit-email:after { content: '>'; }
290
291
.commit-refs {
292
  margin: 0.5rem 0 1rem 0;
293
}
294
295
.commit-refs td {
296
  padding: 0.15rem 0.5rem 0.15rem 0;
297
  border: none;
298
}
299
300
.commit-refs td.label {
301
  padding-right: 1rem;
302
}
303
304
/* diff */
305
.diff {
306
  margin: 1rem 0 1rem 0;
307
  padding: 0.6rem;
308
  border-bottom: 1.5px solid var(--medium-gray);
309
  background: var(--light-gray);
310
}
311
312
.diff-stat { padding: 1rem 0 1rem 0; }
313
.diff-add { color: var(--diff-add); }
314
.diff-del { color: var(--diff-del); }
315
.diff-mod { color: var(--cyan); }
316
.diff-noop { color: var(--gray); }
317
318
.jump { margin-top: 0.5rem; }
319
.jump-table { margin-top: 0.25rem; }
320
321
.jump-table td {
322
  padding: 0.15rem 0.5rem;
323
  border-color: var(--medium-gray);
324
}
325
326
.jump-table .diff-type {
327
  width: 2ch;
328
}
329
330
/* refs */
331
.ref {
332
  font-size: 1rem;
333
  color: var(--gray);
334
  display: inline-block;
335
  padding-top: 0.7em;
336
}
337
338
.refs strong { padding-right: 1em; }
339
.refs pre {
340
  padding-bottom: 0.5rem;
341
  white-space: pre-wrap;
342
}
343
344
.tag-message { margin-left: 0.5rem; }
345
.tag-message summary {
346
  cursor: pointer;
347
  color: var(--gray);
348
}
349
350
/* readme */
351
.readme {
352
  padding: 1.5rem 0;
353
  line-height: 1.6;
354
}
355
.readme > *:first-child { margin-top: 0; }
356
357
.readme h1, .readme h2, .readme h3,
358
.readme h4, .readme h5, .readme h6 {
359
  margin-top: 1.5em;
360
  margin-bottom: 0.5em;
361
  line-height: 1.25;
362
}
363
.readme h1 { font-size: 2rem; }
364
.readme h2 { font-size: 1.5rem; }
365
.readme h3 { font-size: 1.25rem; }
366
.readme h4, .readme h5, .readme h6 { font-size: 1rem; }
367
368
.readme p, .readme ul, .readme ol, .readme pre { margin-bottom: 1em; }
369
.readme ul, .readme ol { padding-left: 2em; }
370
.readme li { margin-bottom: 0.25em; }
371
.readme a { border-bottom: 1.5px solid var(--medium-gray); }
372
.readme a > img { border-bottom: none; }
373
.readme img { max-width: 100%; }
374
.readme pre {
375
  background: var(--light-gray);
376
  padding: 0.6rem;
377
}
378
379
.readme pre.raw {
380
  background: unset;
381
  padding: unset;
382
}
383
384
.readme details > * { padding-left: 1em; }
385
.readme details[data-callout] {
386
  border-left: 4px solid var(--gray);
387
  background: var(--light);
388
  padding: 0.5em 1em;
389
  margin: 1em 0;
390
}
391
.readme details[data-callout] .callout-content { padding-left: 0.5em; }
392
.readme details[data-callout] summary {
393
  font-weight: 600;
394
  cursor: pointer;
395
  margin-bottom: 0.5em;
396
}
397
398
.readme blockquote {
399
  border-left: 3px solid var(--gray);
400
  padding-left: 1em;
401
  color: var(--gray);
402
  margin: 1em 0;
403
}
404
405
@media (max-width: 600px) {
406
  .repo-index {
407
    flex-direction: column;
408
  }
409
410
  .repo-index-main,
411
  .repo-index-side {
412
    flex: none;
413
    width: 100%;
414
  }
415
416
  .commit-info:not(:last-child) {
417
    padding-bottom: 1.5rem;
418
  }
419
420
  pre {
421
    font-size: 0.8rem;
422
  }
423
}