aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorTolmachev Igor <me@igorek.dev>2026-01-08 00:50:24 +0900
committerTolmachev Igor <me@igorek.dev>2026-01-08 00:50:24 +0900
commit54e3c93e8191b7ad236396c53ab178e1e78fa8bc (patch)
treecd888a5dd329f6d5c88794a1c9d4a6a5afa77c25 /www
parent3be0f1150f13f347edff956e4f5f8cc119d9b56e (diff)
downloadcgit_material_docker-54e3c93e8191b7ad236396c53ab178e1e78fa8bc.tar.gz
cgit_material_docker-54e3c93e8191b7ad236396c53ab178e1e78fa8bc.zip
Update cgit.css
Diffstat (limited to 'www')
-rw-r--r--www/cgit.css84
1 files changed, 72 insertions, 12 deletions
diff --git a/www/cgit.css b/www/cgit.css
index 249017c..c3e015f 100644
--- a/www/cgit.css
+++ b/www/cgit.css
@@ -50,14 +50,12 @@ div#cgit table#header {
50 background-color: var(--color-surface-container); 50 background-color: var(--color-surface-container);
51 color: var(--color-on-surface); 51 color: var(--color-on-surface);
52 padding: 1rem; 52 padding: 1rem;
53 /* Transform table to flex for responsiveness */
54 display: flex; 53 display: flex;
55 flex-wrap: wrap; 54 flex-wrap: wrap;
56 align-items: center; 55 align-items: center;
57 border-bottom: 1px solid var(--color-outline-variant); 56 border-bottom: 1px solid var(--color-outline-variant);
58} 57}
59 58
60/* Fix for table structure within header */
61div#cgit table#header tbody, 59div#cgit table#header tbody,
62div#cgit table#header tr { 60div#cgit table#header tr {
63 display: contents; 61 display: contents;
@@ -92,7 +90,7 @@ div#cgit table#header td.sub {
92 padding-top: 0.25rem; 90 padding-top: 0.25rem;
93 color: var(--color-outline); 91 color: var(--color-outline);
94 font-size: 0.9rem; 92 font-size: 0.9rem;
95 border-top: none; /* Removing legacy border */ 93 border-top: none;
96} 94}
97 95
98/* Input Elements */ 96/* Input Elements */
@@ -127,7 +125,7 @@ div#cgit table.tabs {
127 margin: 0; 125 margin: 0;
128 width: 100%; 126 width: 100%;
129 background-color: var(--color-surface); 127 background-color: var(--color-surface);
130 display: flex; /* Modern layout */ 128 display: flex;
131 flex-wrap: wrap; 129 flex-wrap: wrap;
132 padding: 0 1rem; 130 padding: 0 1rem;
133} 131}
@@ -257,6 +255,7 @@ div#cgit table.diff,
257div#cgit table.ssdiff { 255div#cgit table.ssdiff {
258 width: 100%; 256 width: 100%;
259 border: 1px solid var(--color-outline-variant); 257 border: 1px solid var(--color-outline-variant);
258 border-collapse: collapse;
260 border-radius: 4px; 259 border-radius: 4px;
261 overflow: hidden; 260 overflow: hidden;
262 margin-top: 1rem; 261 margin-top: 1rem;
@@ -271,6 +270,11 @@ div#cgit table.ssdiff td.lineno {
271 padding: 0 0.5em; 270 padding: 0 0.5em;
272} 271}
273 272
273div#cgit table.blob td.lines {
274 width: 100%;
275 vertical-align: top;
276}
277
274div#cgit table.blob td.linenumbers a, 278div#cgit table.blob td.linenumbers a,
275div#cgit table.ssdiff td.lineno a { 279div#cgit table.ssdiff td.lineno a {
276 display: inline-block; 280 display: inline-block;
@@ -290,6 +294,58 @@ div#cgit table.ssdiff td {
290 color: var(--color-on-surface); 294 color: var(--color-on-surface);
291} 295}
292 296
297div#cgit table.bin-blob {
298 width: 100%;
299 border: 1px solid var(--color-outline-variant);
300 border-collapse: collapse;
301 border-radius: 4px;
302 overflow: hidden;
303 margin-top: 1rem;
304 background: var(--color-surface-container-lowest);
305 font-family: monospace;
306 font-size: 0.95em;
307}
308
309div#cgit table.bin-blob th {
310 text-align: left;
311 font-weight: 600;
312 color: var(--color-primary);
313 background-color: var(--color-surface-container);
314 padding: 0.5rem 0.75rem;
315 border-bottom: 2px solid var(--color-outline-variant);
316 font-family: sans-serif;
317}
318
319div#cgit table.bin-blob td {
320 padding: 0.25rem 0.75rem;
321 color: var(--color-on-surface);
322 white-space: pre;
323 vertical-align: middle;
324}
325
326div#cgit table.bin-blob td.right {
327 text-align: right;
328 border-right: 1px solid var(--color-outline-variant);
329 background: var(--color-surface-container-high);
330 color: var(--color-outline);
331 padding-right: 0.75rem;
332 user-select: none;
333}
334
335div#cgit table.bin-blob td.hex {
336 font-family: monospace;
337 padding-left: 1rem;
338}
339
340div#cgit table.bin-blob tr:nth-child(even) td.hex {
341 background: var(--color-surface-container-low);
342}
343
344div#cgit table.bin-blob tr:hover td.hex {
345 background: var(--color-surface-container-high);
346 color: var(--color-on-surface);
347}
348
293/* Diff coloring */ 349/* Diff coloring */
294div#cgit table.diff td div.add, 350div#cgit table.diff td div.add,
295div#cgit table.ssdiff td.add { 351div#cgit table.ssdiff td.add {
@@ -444,7 +500,7 @@ div#cgit div.error {
444 500
445 div#cgit div.content { 501 div#cgit div.content {
446 padding: 1rem 0.5rem; 502 padding: 1rem 0.5rem;
447 overflow-x: auto; /* Enable horizontal scroll for content */ 503 overflow-x: auto;
448 } 504 }
449 505
450 /* Force tables to scroll on small screens */ 506 /* Force tables to scroll on small screens */
@@ -454,16 +510,20 @@ div#cgit div.error {
454 white-space: nowrap; 510 white-space: nowrap;
455 } 511 }
456 512
513 div#cgit table.bin-blob {
514 white-space: nowrap;
515 display: block; /* Позволяет скроллить саму таблицу */
516 overflow-x: auto;
517 }
518
519 div#cgit table.bin-blob th,
520 div#cgit table.bin-blob td {
521 padding: 0.5rem;
522 }
523
457 /* Allow wrapping in logs on mobile to prevent extreme width */ 524 /* Allow wrapping in logs on mobile to prevent extreme width */
458 div#cgit table.list td.logmsg { 525 div#cgit table.list td.logmsg {
459 white-space: normal; 526 white-space: normal;
460 min-width: 200px; 527 min-width: 200px;
461 } 528 }
462} 529}
463
464/* Container override for highlighted code to handle font sizing */
465div#cgit table.blob pre {
466 font-family: monospace;
467 font-size: 0.95em;
468 line-height: 1.4;
469}