all repos

mugit @ 3e7e955721c228676202c787a670427eb9113cdb

🐮 git server that your cow will love

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

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