diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/cgit.css | 84 |
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 */ | ||
| 61 | div#cgit table#header tbody, | 59 | div#cgit table#header tbody, |
| 62 | div#cgit table#header tr { | 60 | div#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, | |||
| 257 | div#cgit table.ssdiff { | 255 | div#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 | ||
| 273 | div#cgit table.blob td.lines { | ||
| 274 | width: 100%; | ||
| 275 | vertical-align: top; | ||
| 276 | } | ||
| 277 | |||
| 274 | div#cgit table.blob td.linenumbers a, | 278 | div#cgit table.blob td.linenumbers a, |
| 275 | div#cgit table.ssdiff td.lineno a { | 279 | div#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 | ||
| 297 | div#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 | |||
| 309 | div#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 | |||
| 319 | div#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 | |||
| 326 | div#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 | |||
| 335 | div#cgit table.bin-blob td.hex { | ||
| 336 | font-family: monospace; | ||
| 337 | padding-left: 1rem; | ||
| 338 | } | ||
| 339 | |||
| 340 | div#cgit table.bin-blob tr:nth-child(even) td.hex { | ||
| 341 | background: var(--color-surface-container-low); | ||
| 342 | } | ||
| 343 | |||
| 344 | div#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 */ |
| 294 | div#cgit table.diff td div.add, | 350 | div#cgit table.diff td div.add, |
| 295 | div#cgit table.ssdiff td.add { | 351 | div#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 */ | ||
| 465 | div#cgit table.blob pre { | ||
| 466 | font-family: monospace; | ||
| 467 | font-size: 0.95em; | ||
| 468 | line-height: 1.4; | ||
| 469 | } | ||
