all repos

mugit @ 2d69e9b

🐮 git server that your cow will love

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
ui: dont put non markdown readmes in to the "box"..., 3 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
/* tables */
107
.table {
108
  width: 100%;
109
  border-collapse: collapse;
110
  table-layout: auto;
111
}
112
113
.table th {
114
  text-align: left;
115
  font-weight: 500;
116
  border-bottom: 1.5px solid var(--medium-gray);
117
  padding: 0.25em 0.5em;
118
}
119
120
.table td {
121
  border-bottom: 1px solid var(--light-gray);
122
  padding: 0.25em 0.5em;
123
  vertical-align: top;
124
}
125
126
.table tbody tr:hover { background: var(--light); }
127
.table tbody tr.nohover:hover { background: transparent; }
128
129
/* tooltip */
130
.tooltip {
131
  display: none;
132
  position: absolute;
133
  left: 0;
134
  top: 100%;
135
  margin-top: 0.25rem;
136
  padding: 0.5rem 0.7rem;
137
  background: var(--white);
138
  border: 1px solid var(--medium-gray);
139
  border-radius: 4px;
140
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
141
  z-index: 10;
142
  font-size: 0.85em;
143
  line-height: 1.3;
144
  max-width: 48ch;
145
  white-space: nowrap;
146
}
147
148
.author, .age { position: relative; }
149
150
.author:hover .tooltip,
151
.author:focus-within .tooltip,
152
.age:hover .tooltip,
153
.age:focus-within .tooltip {
154
  display: block;
155
}
156
157
/* box */
158
.box {
159
  background: var(--light-gray);
160
  padding: 0.6rem;
161
}
162
163
.box + .box {
164
  margin-top: 0.8rem;
165
}
166
167
/* repo header */
168
.repo-header { margin-bottom: 1.25rem; }
169
170
.repo-breadcrumb,
171
.repo-breadcrumb a {
172
  color: var(--gray);
173
}
174
175
.repo-breadcrumb:before { content: "<"; }
176
177
.repo-name {
178
  font-size: 1.6rem;
179
  line-height: 1.1;
180
  margin-top: 0.25rem;
181
}
182
183
.repo-header .desc { margin-top: 0.35rem; }
184
.repo-header .repo-nav { padding: 0.5rem 0 0 0; }
185
.repo-header .repo-nav ul { padding-bottom: 0; }
186
187
/* index page */
188
.index { margin-top: 2em; }
189
190
/* repo index */
191
.repo-index {
192
  display: flex;
193
  gap: 1.25rem;
194
  align-items: flex-start;
195
}
196
197
.repo-index-main { flex: 0 0 72ch; }
198
.repo-index-main .box { width: 100%; }
199
.repo-index-side {
200
  flex: 0 0 26rem;
201
  min-width: 0;
202
}
203
204
.repo-index-side h2 {
205
  font-size: 1.4rem;
206
  padding: 0;
207
}
208
209
/* log page */
210
.log td.author .author-short {
211
  display: inline-block;
212
  max-width: 25ch;
213
  overflow: hidden;
214
  text-overflow: ellipsis;
215
  vertical-align: top;
216
}
217
218
/* tree */
219
.tree, .log, .repo-index { margin-bottom: 2em; }
220
221
/* file View */
222
.file-wrapper {
223
  display: flex;
224
  flex-direction: row;
225
  gap: 1rem;
226
  padding: 0 0.5rem;
227
  background: var(--light-gray);
228
  overflow-x: auto;
229
}
230
231
.line-numbers {
232
  white-space: pre-line;
233
  -moz-user-select: -moz-none;
234
  -khtml-user-select: none;
235
  -webkit-user-select: none;
236
  -o-user-select: none;
237
  user-select: none;
238
  padding-right: 1ch;
239
}
240
241
.file-content {
242
  padding-left: 1.5ch;
243
  overflow-y: hidden;
244
  overflow-x: auto;
245
}
246
.image-viewer, .binary-viewer { padding: 1rem 0; }
247
.image-viewer img {
248
  max-width: 100%;
249
  height: auto;
250
}
251
252
.line-numbers pre,
253
.file-content pre {
254
  margin: 0;
255
  line-height: 1.5;
256
}
257
258
/* commit */
259
.commit { margin-bottom: 1rem; }
260
261
.commit pre {
262
  padding-bottom: 0;
263
  white-space: pre-wrap;
264
}
265
266
.commit .box { margin-bottom: 0.25rem; }
267
.commit .commit-info {
268
  padding-bottom: 0.25rem;
269
}
270
271
.commit-message {
272
  margin-top: 0.25rem;
273
  font-size: 1rem;
274
  line-height: 1.35;
275
  margin-bottom: 1rem;
276
}
277
278
.commit-info {
279
  color: var(--gray);
280
  font-size: 0.85rem;
281
}
282
283
.commit-date { float: right; }
284
285
.commit-email:before { content: '<'; }
286
.commit-email:after { content: '>'; }
287
288
.commit-refs {
289
  margin: 0.5rem 0 1rem 0;
290
}
291
292
.commit-refs td {
293
  padding: 0.15rem 0.5rem 0.15rem 0;
294
  border: none;
295
}
296
297
.commit-refs td.label {
298
  padding-right: 1rem;
299
}
300
301
/* diff */
302
.diff {
303
  margin: 1rem 0 1rem 0;
304
  padding: 0.6rem;
305
  border-bottom: 1.5px solid var(--medium-gray);
306
  background: var(--light-gray);
307
}
308
309
.diff-stat { padding: 1rem 0 1rem 0; }
310
.diff-add { color: var(--diff-add); }
311
.diff-del { color: var(--diff-del); }
312
.diff-mod { color: var(--cyan); }
313
.diff-noop { color: var(--gray); }
314
315
.jump { margin-top: 0.5rem; }
316
.jump-table { margin-top: 0.25rem; }
317
318
.jump-table td {
319
  padding: 0.15rem 0.5rem;
320
  border-color: var(--medium-gray);
321
}
322
323
.jump-table .diff-type {
324
  width: 2ch;
325
}
326
327
/* refs */
328
.ref {
329
  font-size: 1rem;
330
  color: var(--gray);
331
  display: inline-block;
332
  padding-top: 0.7em;
333
}
334
335
.refs strong { padding-right: 1em; }
336
.refs pre {
337
  padding-bottom: 0.5rem;
338
  white-space: pre-wrap;
339
}
340
341
.tag-message { margin-left: 0.5rem; }
342
.tag-message summary {
343
  cursor: pointer;
344
  color: var(--gray);
345
}
346
347
/* readme */
348
.readme {
349
  padding: 1.5rem 0;
350
  line-height: 1.6;
351
}
352
.readme > *:first-child { margin-top: 0; }
353
354
.readme h1, .readme h2, .readme h3,
355
.readme h4, .readme h5, .readme h6 {
356
  margin-top: 1.5em;
357
  margin-bottom: 0.5em;
358
  line-height: 1.25;
359
}
360
.readme h1 { font-size: 2rem; }
361
.readme h2 { font-size: 1.5rem; }
362
.readme h3 { font-size: 1.25rem; }
363
.readme h4, .readme h5, .readme h6 { font-size: 1rem; }
364
365
.readme p, .readme ul, .readme ol, .readme pre { margin-bottom: 1em; }
366
.readme ul, .readme ol { padding-left: 2em; }
367
.readme li { margin-bottom: 0.25em; }
368
.readme a { border-bottom: 1.5px solid var(--medium-gray); }
369
.readme a > img { border-bottom: none; }
370
.readme img { max-width: 100%; }
371
.readme pre {
372
  background: var(--light-gray);
373
  padding: 0.6rem;
374
}
375
376
.readme pre.raw {
377
  background: unset;
378
  padding: unset;
379
}
380
381
.readme details > * { padding-left: 1em; }
382
.readme details[data-callout] {
383
  border-left: 4px solid var(--gray);
384
  background: var(--light);
385
  padding: 0.5em 1em;
386
  margin: 1em 0;
387
}
388
.readme details[data-callout] .callout-content { padding-left: 0.5em; }
389
.readme details[data-callout] summary {
390
  font-weight: 600;
391
  cursor: pointer;
392
  margin-bottom: 0.5em;
393
}
394
395
.readme blockquote {
396
  border-left: 3px solid var(--gray);
397
  padding-left: 1em;
398
  color: var(--gray);
399
  margin: 1em 0;
400
}
401
402
@media (max-width: 600px) {
403
  .repo-index {
404
    flex-direction: column;
405
  }
406
407
  .repo-index-main,
408
  .repo-index-side {
409
    flex: none;
410
    width: 100%;
411
  }
412
413
  .commit-info:not(:last-child) {
414
    padding-bottom: 1.5rem;
415
  }
416
417
  pre {
418
    font-size: 0.8rem;
419
  }
420
}