index : gitrs
A lightweight web interface for browsing Git repositories, implemented in Rust
about summary refs log tree commit diff
gitrs / static / style.css
-rw-r--r-- blob 08cf526a96a2551342c27debc9b5eaa515903e8b 12113 bytes (plain)
1
/* ==========================================================================
2
   1. Design Tokens (Catppuccin Mocha Palette)
3
   ========================================================================== */
4
:root {
5
  --base: #1e1d2d;
6
  --mantle: #181825;
7
  --crust: #11111b;
8
9
  --text: #cdd6f4;
10
  --subtext1: #bac2de;
11
  --subtext0: #a6adc8;
12
13
  --surface0: #313244;
14
  --surface1: #45475a;
15
  --surface2: #585b70;
16
17
  --overlay0: #6c7086;
18
  --overlay1: #7f849c;
19
  --overlay2: #9399b2;
20
21
  --rosewater: #f5e0dc;
22
  --flamingo: #f2cdcd;
23
  --pink: #f5c2e7;
24
  --mauve: #cba6f7;
25
  --red: #f38ba8;
26
  --maroon: #eba0ac;
27
  --peach: #fab387;
28
  --yellow: #f9e2af;
29
  --green: #a6e3a1;
30
  --teal: #94e2d5;
31
  --sky: #89dceb;
32
  --sapphire: #74c7ec;
33
  --blue: #89b4fa;
34
  --lavender: #b4befe;
35
36
  --white: #D9E0EE;
37
  --black2: #252434;
38
  --one_bg: #2d2c3c;
39
  --one_bg2: #363545;
40
  --one_bg3: #3e3d4d;
41
  --grey: #474656;
42
  --grey_fg: #4e4d5d;
43
  --grey_fg2: #555464;
44
  --light_grey: #605f6f;
45
}
46
47
/* ==========================================================================
48
   2. Base & Typography (Sharp Corners, Zero Border-Radius)
49
   ========================================================================== */
50
*,
51
*::before,
52
*::after {
53
  box-sizing: border-box;
54
  border-radius: 0;
55
}
56
57
body {
58
  font-family: 'Maple Mono NF', monospace;
59
  font-size: 0.95rem;
60
  line-height: 1.5;
61
  margin: 0;
62
  background: var(--base);
63
  color: var(--text);
64
}
65
66
div#body {
67
  padding: 1.5rem 2.5rem 3rem;
68
}
69
70
main {
71
  padding: 1.25rem 0 0;
72
  margin: 0 auto;
73
}
74
75
h1,
76
h2,
77
h3,
78
h4 {
79
  color: var(--text);
80
  margin-top: 1.25rem;
81
  margin-bottom: 0.6rem;
82
}
83
84
a {
85
  color: var(--peach);
86
  padding: 3px 6px;
87
  text-decoration: none;
88
}
89
90
a:hover,
91
a:active,
92
a.active {
93
  color: var(--crust);
94
  background: var(--peach);
95
}
96
97
a:focus-visible,
98
input:focus-visible,
99
select:focus-visible {
100
  outline: 1px solid var(--peach);
101
  outline-offset: 1px;
102
}
103
104
code {
105
  background: var(--black2);
106
  color: var(--green);
107
  padding: 2px 6px;
108
  border: 1px solid var(--surface0);
109
}
110
111
pre {
112
  color: var(--text);
113
  background: var(--black2);
114
  border: 1px solid var(--surface1);
115
  font-family: inherit;
116
  font-size: 0.9rem;
117
  padding: 0.6rem 0.9rem;
118
  overflow-x: auto;
119
}
120
121
pre code {
122
  color: var(--text);
123
  background: transparent;
124
  border: none;
125
  padding: 0;
126
}
127
128
/* ==========================================================================
129
   3. Global Tables & Forms
130
   ========================================================================== */
131
table {
132
  border-collapse: collapse;
133
  width: 100%;
134
}
135
136
table.section-table {
137
  margin-bottom: 1.75rem;
138
}
139
140
th {
141
  text-align: left;
142
  white-space: nowrap;
143
  color: var(--peach);
144
  font-weight: 600;
145
  letter-spacing: 0.04em;
146
  padding: 0.55rem 0.9rem;
147
  border-bottom: 1px solid var(--surface1);
148
}
149
150
td {
151
  text-align: left;
152
  white-space: nowrap;
153
  padding: 0.6rem 0.9rem;
154
}
155
156
td a {
157
  color: var(--text);
158
}
159
160
td.mode,
161
th.mode {
162
  width: 11ch;
163
  font-family: inherit;
164
  white-space: nowrap;
165
  color: var(--subtext0);
166
}
167
168
th.mode {
169
  color: var(--peach);
170
}
171
172
tbody tr:nth-child(even) {
173
  background: var(--one_bg);
174
}
175
176
tbody tr:nth-child(odd) {
177
  background: var(--black2);
178
}
179
180
tbody tr:hover {
181
  background: var(--surface0);
182
}
183
184
tbody tr.no-background:nth-child(even),
185
tbody tr.no-background:nth-child(odd),
186
tbody tr.no-background:hover {
187
  background: transparent;
188
}
189
190
td.form {
191
  text-align: right;
192
}
193
194
td.form form {
195
  display: inline-flex;
196
  align-items: center;
197
  gap: 0.35rem;
198
}
199
200
td.form input,
201
td.form select {
202
  font-family: inherit;
203
  font-size: 0.85rem;
204
  color: var(--text);
205
  background: var(--surface0);
206
  border: 1px solid var(--surface1);
207
  padding: 0.3rem 0.55rem;
208
}
209
210
td.form input[type="submit"] {
211
  cursor: pointer;
212
  color: var(--subtext1);
213
  background: var(--one_bg2);
214
}
215
216
td.form input[type="submit"]:hover {
217
  color: var(--crust);
218
  background: var(--peach);
219
  border-color: var(--peach);
220
}
221
222
/* ==========================================================================
223
   4. Header & Navigation Tabs
224
   ========================================================================== */
225
table.header {
226
  padding: 0.5rem 2.5rem 0;
227
}
228
229
table.header tr,
230
table.header tr:nth-child(odd),
231
table.header tr:nth-child(even),
232
table.header tr:hover {
233
  background: transparent;
234
}
235
236
td.logo {
237
  width: 72px;
238
  vertical-align: middle;
239
  padding: 0.75rem 0.75rem 0.75rem 2rem;
240
}
241
242
td.logo a:hover {
243
  background: transparent;
244
}
245
246
td.logo img {
247
  width: 64px;
248
  height: 64px;
249
  display: block;
250
}
251
252
td.main {
253
  font-size: 1.65rem;
254
  font-weight: 600;
255
  padding: 0.6rem 0.75rem 0.25rem;
256
  white-space: nowrap;
257
}
258
259
td.sub {
260
  color: var(--subtext0);
261
  border-top: 1px solid var(--surface1);
262
  padding: 0.45rem 0.75rem;
263
  font-size: 0.9rem;
264
}
265
266
.tabs {
267
  background: var(--black2);
268
  border: 1px solid var(--surface0);
269
}
270
271
.tabs td {
272
  padding: 0.5rem 0.75rem;
273
}
274
275
.tabs a {
276
  color: var(--text);
277
  padding: 0.25rem 0.6rem;
278
  margin-right: 0.15rem;
279
}
280
281
.tree-breadcrumb {
282
  background: var(--mantle);
283
  border: 1px solid var(--surface0);
284
  border-top: none;
285
  padding: 0.45rem 0.75rem;
286
  font-size: 0.9rem;
287
}
288
289
.show_more td,
290
td.show_more {
291
  padding: 0.45rem 0.6rem;
292
}
293
294
.show_more a,
295
.pagination a {
296
  color: var(--peach);
297
  font-size: 0.95rem;
298
}
299
300
.show_more a:hover,
301
.pagination a:hover {
302
  color: var(--crust);
303
}
304
305
.pagination {
306
  padding-top: 0.85rem;
307
  text-align: center;
308
}
309
310
/* ==========================================================================
311
   5. Metadata Badges, Avatars & Status Indicators
312
   ========================================================================== */
313
.fresh {
314
  color: var(--green);
315
  font-weight: 600;
316
}
317
318
.recent {
319
  color: var(--subtext0);
320
}
321
322
.stale {
323
  color: var(--overlay0);
324
}
325
326
.description {
327
  color: var(--subtext1);
328
  font-style: italic;
329
}
330
331
a.folder {
332
  color: var(--peach);
333
  font-weight: 600;
334
}
335
336
.clone-url {
337
  background: var(--surface0);
338
  color: var(--peach);
339
  padding: 4px 10px;
340
  font-size: 0.85em;
341
}
342
343
.badge_head {
344
  background: var(--crust);
345
  color: var(--red);
346
  border: 1px solid var(--red);
347
  padding: 1px 6px;
348
  margin-left: 0.35rem;
349
  font-size: 0.8rem;
350
}
351
352
.badge_branch {
353
  background: var(--crust);
354
  color: var(--green);
355
  border: 1px solid var(--green);
356
  padding: 1px 6px;
357
  margin-left: 0.35rem;
358
  font-size: 0.8rem;
359
}
360
361
.badge_branch:hover,
362
.badge_head:hover {
363
  color: var(--crust);
364
  background: var(--peach);
365
  border-color: var(--peach);
366
}
367
368
.green {
369
  color: var(--green);
370
}
371
372
.red {
373
  color: var(--red);
374
}
375
376
span.avatar {
377
  display: inline-flex;
378
  align-items: center;
379
  vertical-align: middle;
380
  margin-right: 0.25rem;
381
}
382
383
span.avatar img.inline {
384
  width: 18px;
385
  height: 18px;
386
  border: 1px solid var(--surface1);
387
}
388
389
span.avatar img.onhover {
390
  display: none;
391
  border: 1px solid var(--surface1);
392
  padding: 0;
393
  width: 128px;
394
  height: 128px;
395
}
396
397
span.avatar:hover > img.onhover {
398
  display: block;
399
  position: absolute;
400
  margin-left: 1.5em;
401
  background-color: var(--crust);
402
  z-index: 10;
403
}
404
405
/* ==========================================================================
406
   6. Commit View & Message Cell
407
   ========================================================================== */
408
td.msg {
409
  display: flex;
410
  align-items: center;
411
  gap: 0.4em;
412
  overflow: hidden;
413
}
414
415
td.msg .msg-text {
416
  overflow: hidden;
417
  text-overflow: ellipsis;
418
  white-space: nowrap;
419
  min-width: 0;
420
}
421
422
td.author {
423
  white-space: nowrap;
424
}
425
426
.commit-info {
427
  margin-top: 0.5rem;
428
  width: auto;
429
  background: var(--black2);
430
  border: 1px solid var(--surface0);
431
}
432
433
.commit-info tr:nth-child(odd),
434
.commit-info tr:nth-child(even),
435
.commit-info tr:hover {
436
  background-color: transparent;
437
}
438
439
.commit-info td {
440
  padding: 0.3rem 1rem;
441
}
442
443
.commit-info td:first-child {
444
  color: var(--subtext0);
445
}
446
447
.commit-info a {
448
  color: var(--peach);
449
}
450
451
.commit-subject {
452
  padding: 0.75rem 0;
453
  border-bottom: 1px solid var(--surface0);
454
  margin-bottom: 1rem;
455
}
456
457
.commit-subject h1 {
458
  font-weight: 600;
459
  font-size: 1.15rem;
460
  margin: 0.25rem 0;
461
}
462
463
.commit-subject h4 {
464
  font-weight: normal;
465
  color: var(--subtext0);
466
  white-space: pre-wrap;
467
  margin: 0.5rem 0 0;
468
}
469
470
/* ==========================================================================
471
   7. Tree & Blob View
472
   ========================================================================== */
473
.blob-meta {
474
  display: flex;
475
  align-items: center;
476
  gap: 1em;
477
  padding: 0.5em 0.8em;
478
  margin-bottom: 0;
479
  background-color: var(--mantle);
480
  border: 1px solid var(--surface0);
481
  border-bottom: none;
482
  font-family: inherit;
483
  font-size: 0.9em;
484
}
485
486
.blob-meta .mode {
487
  white-space: nowrap;
488
  color: var(--green);
489
}
490
491
.blob-meta .blob-id {
492
  color: var(--subtext0);
493
  overflow: hidden;
494
  text-overflow: ellipsis;
495
}
496
497
.blob-meta .size {
498
  white-space: nowrap;
499
  color: var(--subtext1);
500
  margin-left: auto;
501
}
502
503
.blob-table {
504
  width: 100%;
505
  border-collapse: collapse;
506
  font-family: inherit;
507
  background: var(--black2);
508
  border: 1px solid var(--surface0);
509
}
510
511
.blob-table tr:nth-child(odd),
512
.blob-table tr:nth-child(even) {
513
  background-color: transparent;
514
}
515
516
.blob-table tr:hover {
517
  background-color: var(--one_bg);
518
}
519
520
.blob-table .line-no {
521
  width: 4.5em;
522
  text-align: right;
523
  padding: 0.05rem 0.75rem;
524
  color: var(--overlay0);
525
  user-select: none;
526
  border-right: 1px solid var(--surface0);
527
  vertical-align: top;
528
  white-space: nowrap;
529
}
530
531
.blob-table .line-content {
532
  width: 100%;
533
  padding: 0.05rem 0.85rem;
534
  color: var(--text);
535
}
536
537
.blob-table .line-content pre {
538
  margin: 0;
539
  background: none;
540
  border: none;
541
  padding: 0;
542
  white-space: pre-wrap;
543
  word-break: break-all;
544
}
545
546
/* ==========================================================================
547
   8. Diff & Diffstat
548
   ========================================================================== */
549
table.diffstat {
550
  background: var(--black2);
551
  border: 1px solid var(--surface0);
552
  width: auto;
553
  min-width: 50%;
554
  max-width: 100%;
555
  margin-bottom: 1rem;
556
}
557
558
table.diffstat td {
559
  padding: 0.3rem 0.65rem;
560
}
561
562
.diffstat tr,
563
.diffstat tr:nth-child(odd),
564
.diffstat tr:nth-child(even),
565
.diffstat tr:hover {
566
  background-color: transparent;
567
}
568
569
.diffstat .mode,
570
.diffstat .upd,
571
.diffstat .right {
572
  width: 1%;
573
}
574
575
.diffstat .right {
576
  text-align: right;
577
  color: var(--subtext0);
578
}
579
580
.diffstat .graph {
581
  min-width: 120px;
582
}
583
584
a.diffstat-added {
585
  color: var(--green);
586
}
587
588
a.diffstat-removed {
589
  color: var(--red);
590
}
591
592
a.diffstat-changed {
593
  color: var(--peach);
594
}
595
596
a.diffstat-added:hover,
597
a.diffstat-removed:hover,
598
a.diffstat-changed:hover {
599
  color: var(--crust);
600
}
601
602
.diffstat-addition {
603
  background: var(--green);
604
  height: 0.45rem;
605
  padding: 0 !important;
606
}
607
608
.diffstat-deletion {
609
  background: var(--red);
610
  height: 0.45rem;
611
  padding: 0 !important;
612
}
613
614
pre.diff {
615
  color: var(--text);
616
  background: var(--black2);
617
  border: 1px solid var(--surface0);
618
  font-size: 0.88rem;
619
  padding: 0.75rem 1rem;
620
  line-height: 1.45;
621
}
622
623
.diff-hunk {
624
  color: var(--blue);
625
  display: block;
626
  margin-top: 0.25rem;
627
}
628
629
.diff-file-header {
630
  font-weight: 600;
631
  color: var(--subtext1);
632
}
633
634
.diff-file-header > span > span {
635
  font-weight: normal;
636
}
637
638
.diff-addition {
639
  background: #243330;
640
  color: var(--green);
641
  display: block;
642
}
643
644
.diff-addition::before {
645
  content: '+ ';
646
  display: inline-block;
647
  color: var(--overlay1);
648
}
649
650
.diff-deletion {
651
  background: #362432;
652
  color: var(--red);
653
  display: block;
654
}
655
656
.diff-deletion::before {
657
  content: '- ';
658
  display: inline-block;
659
  color: var(--overlay1);
660
}
661
662
.diff-context::before {
663
  content: '  ';
664
  display: inline-block;
665
  color: var(--overlay1);
666
}
667
668
/* ==========================================================================
669
   9. Markdown & Readme
670
   ========================================================================== */
671
.readme {
672
  background: var(--black2);
673
  border: 1px solid var(--surface0);
674
  padding: 1.25rem 1.75rem;
675
}
676
677
.readme h1,
678
.readme h2,
679
.readme h3,
680
.readme h4,
681
.readme h5,
682
.readme h6 {
683
  margin-bottom: 0.75rem;
684
}
685
686
.readme h1,
687
.readme h2 {
688
  border-bottom: 1px solid var(--surface1);
689
  padding-bottom: 0.3rem;
690
}
691
692
.readme p {
693
  font-size: 0.92rem;
694
  color: var(--subtext1);
695
}
696
697
.readme hr {
698
  border: none;
699
  border-top: 1px solid var(--surface1);
700
}