all repos

mugit @ b598730

🐮 git server that your cow will love

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

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