all repos

mugit @ f03a67a4b3efcfc8797ea64aa3bd3bc5e5d745b5

🐮 git server that your cow will love

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

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