all repos

mugit @ afcecfcfa4a38ad7a1008ab2f44cc2e978081f71

🐮 git server that your cow will love

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
ui: add breadcrumbs on tree page, 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
.line-numbers {
234
  white-space: pre-line;
235
  -moz-user-select: -moz-none;
236
  -khtml-user-select: none;
237
  -webkit-user-select: none;
238
  -o-user-select: none;
239
  user-select: none;
240
  padding-right: 1ch;
241
}
242
243
.file-content {
244
  padding-left: 1.5ch;
245
  overflow-y: hidden;
246
  overflow-x: auto;
247
}
248
.image-viewer, .binary-viewer { padding: 1rem 0; }
249
.image-viewer img {
250
  max-width: 100%;
251
  height: auto;
252
}
253
254
.line-numbers pre,
255
.file-content pre {
256
  margin: 0;
257
  line-height: 1.5;
258
}
259
260
/* commit */
261
.commit { margin-bottom: 1rem; }
262
263
.commit pre {
264
  padding-bottom: 0;
265
  white-space: pre-wrap;
266
}
267
268
.commit .box { margin-bottom: 0.25rem; }
269
.commit .commit-info {
270
  padding-bottom: 0.25rem;
271
}
272
273
.commit-message {
274
  margin-top: 0.25rem;
275
  font-size: 1rem;
276
  line-height: 1.35;
277
  margin-bottom: 1rem;
278
}
279
280
.commit-info {
281
  color: var(--gray);
282
  font-size: 0.85rem;
283
}
284
285
.commit-date { float: right; }
286
287
.commit-email:before { content: '<'; }
288
.commit-email:after { content: '>'; }
289
290
.commit-refs {
291
  margin: 0.5rem 0 1rem 0;
292
}
293
294
.commit-refs td {
295
  padding: 0.15rem 0.5rem 0.15rem 0;
296
  border: none;
297
}
298
299
.commit-refs td.label {
300
  padding-right: 1rem;
301
}
302
303
/* diff */
304
.diff {
305
  margin: 1rem 0 1rem 0;
306
  padding: 0.6rem;
307
  border-bottom: 1.5px solid var(--medium-gray);
308
  background: var(--light-gray);
309
}
310
311
.diff-stat { padding: 1rem 0 1rem 0; }
312
.diff-add { color: var(--diff-add); }
313
.diff-del { color: var(--diff-del); }
314
.diff-mod { color: var(--cyan); }
315
.diff-noop { color: var(--gray); }
316
317
.jump { margin-top: 0.5rem; }
318
.jump-table { margin-top: 0.25rem; }
319
320
.jump-table td {
321
  padding: 0.15rem 0.5rem;
322
  border-color: var(--medium-gray);
323
}
324
325
.jump-table .diff-type {
326
  width: 2ch;
327
}
328
329
/* refs */
330
.ref {
331
  font-size: 1rem;
332
  color: var(--gray);
333
  display: inline-block;
334
  padding-top: 0.7em;
335
}
336
337
.refs strong { padding-right: 1em; }
338
.refs pre {
339
  padding-bottom: 0.5rem;
340
  white-space: pre-wrap;
341
}
342
343
.tag-message { margin-left: 0.5rem; }
344
.tag-message summary {
345
  cursor: pointer;
346
  color: var(--gray);
347
}
348
349
/* readme */
350
.readme {
351
  padding: 1.5rem 0;
352
  line-height: 1.6;
353
}
354
.readme > *:first-child { margin-top: 0; }
355
356
.readme h1, .readme h2, .readme h3,
357
.readme h4, .readme h5, .readme h6 {
358
  margin-top: 1.5em;
359
  margin-bottom: 0.5em;
360
  line-height: 1.25;
361
}
362
.readme h1 { font-size: 2rem; }
363
.readme h2 { font-size: 1.5rem; }
364
.readme h3 { font-size: 1.25rem; }
365
.readme h4, .readme h5, .readme h6 { font-size: 1rem; }
366
367
.readme p, .readme ul, .readme ol, .readme pre { margin-bottom: 1em; }
368
.readme ul, .readme ol { padding-left: 2em; }
369
.readme li { margin-bottom: 0.25em; }
370
.readme a { border-bottom: 1.5px solid var(--medium-gray); }
371
.readme a > img { border-bottom: none; }
372
.readme img { max-width: 100%; }
373
.readme pre {
374
  background: var(--light-gray);
375
  padding: 0.6rem;
376
}
377
378
.readme pre.raw {
379
  background: unset;
380
  padding: unset;
381
}
382
383
.readme details > * { padding-left: 1em; }
384
.readme details[data-callout] {
385
  border-left: 4px solid var(--gray);
386
  background: var(--light);
387
  padding: 0.5em 1em;
388
  margin: 1em 0;
389
}
390
.readme details[data-callout] .callout-content { padding-left: 0.5em; }
391
.readme details[data-callout] summary {
392
  font-weight: 600;
393
  cursor: pointer;
394
  margin-bottom: 0.5em;
395
}
396
397
.readme blockquote {
398
  border-left: 3px solid var(--gray);
399
  padding-left: 1em;
400
  color: var(--gray);
401
  margin: 1em 0;
402
}
403
404
@media (max-width: 600px) {
405
  .repo-index {
406
    flex-direction: column;
407
  }
408
409
  .repo-index-main,
410
  .repo-index-side {
411
    flex: none;
412
    width: 100%;
413
  }
414
415
  .commit-info:not(:last-child) {
416
    padding-bottom: 1.5rem;
417
  }
418
419
  pre {
420
    font-size: 0.8rem;
421
  }
422
}