all repos

mugit @ 56ad3f8dd0ac999a121a4f92b7cbdfede58666c8

🐮 git server that your cow will love

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

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