mugit/web/static/style.css (view raw)
Oleksandr Smirnov
Oleksandr Smirnov
olexsmir@gmail.com ui: show full commit date in tooltip, 4 months ago
olexsmir@gmail.com ui: show full commit date in tooltip, 4 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 | |
| 11 | --sans-font: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif; |
| 12 | --display-font: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif; |
| 13 | --mono-font: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', 'Roboto Mono', Menlo, Consolas, monospace; |
| 14 | } |
| 15 | |
| 16 | @media (prefers-color-scheme: dark) { |
| 17 | :root { |
| 18 | color-scheme: dark light; |
| 19 | --light: #181818; |
| 20 | --cyan: #76c7c0; |
| 21 | --light-gray: #333; |
| 22 | --medium-gray: #444; |
| 23 | --gray: #aaa; |
| 24 | --dark: #ddd; |
| 25 | --darker: #f4f4f4; |
| 26 | --white: #000; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | html { |
| 31 | background: var(--white); |
| 32 | -webkit-text-size-adjust: none; |
| 33 | font-family: var(--sans-font); |
| 34 | font-weight: 380; |
| 35 | } |
| 36 | |
| 37 | pre { |
| 38 | font-family: var(--mono-font); |
| 39 | overflow-x: auto; |
| 40 | } |
| 41 | |
| 42 | ::selection { |
| 43 | background: var(--medium-gray); |
| 44 | opacity: 0.3; |
| 45 | } |
| 46 | |
| 47 | * { |
| 48 | box-sizing: border-box; |
| 49 | padding: 0; |
| 50 | margin: 0; |
| 51 | } |
| 52 | |
| 53 | body { |
| 54 | max-width: 1200px; |
| 55 | padding: 0 13px; |
| 56 | margin: 40px auto; |
| 57 | } |
| 58 | |
| 59 | main, footer { |
| 60 | font-size: 1rem; |
| 61 | padding: 0; |
| 62 | line-height: 160%; |
| 63 | } |
| 64 | |
| 65 | header h1, h2, h3 { |
| 66 | font-family: var(--display-font); |
| 67 | } |
| 68 | |
| 69 | h2 { font-weight: 400; } |
| 70 | strong { font-weight: 500; } |
| 71 | |
| 72 | main h1 { padding: 10px 0 10px 0; } |
| 73 | main h2 { font-size: 18px; } |
| 74 | main h3 { font-size: 1.15rem; } |
| 75 | main h2, h3 { padding: 20px 0 0.4rem 0; } |
| 76 | |
| 77 | nav { padding: 0.4rem 0 1.5rem 0; } |
| 78 | nav ul { |
| 79 | padding: 0; |
| 80 | margin: 0; |
| 81 | list-style: none; |
| 82 | padding-bottom: 20px; |
| 83 | } |
| 84 | |
| 85 | nav ul li { |
| 86 | padding-right: 10px; |
| 87 | display: inline-block; |
| 88 | } |
| 89 | |
| 90 | .repo-header { |
| 91 | margin-bottom: 1.25rem; |
| 92 | } |
| 93 | |
| 94 | .repo-breadcrumb { |
| 95 | color: var(--gray); |
| 96 | } |
| 97 | |
| 98 | .repo-breadcrumb:before { |
| 99 | content: "<"; /* TODO: add an arrow */ |
| 100 | } |
| 101 | |
| 102 | .repo-breadcrumb a { |
| 103 | color: var(--gray); |
| 104 | } |
| 105 | |
| 106 | .repo-name { |
| 107 | font-size: 1.6rem; |
| 108 | line-height: 1.1; |
| 109 | margin-top: 0.25rem; |
| 110 | } |
| 111 | |
| 112 | .repo-header .desc { |
| 113 | color: var(--gray); |
| 114 | margin-top: 0.35rem; |
| 115 | } |
| 116 | |
| 117 | .repo-header .repo-nav { |
| 118 | padding: 0.5rem 0 0 0; |
| 119 | } |
| 120 | |
| 121 | .repo-header .repo-nav ul { |
| 122 | padding-bottom: 0; |
| 123 | } |
| 124 | |
| 125 | a { |
| 126 | margin: 0; |
| 127 | padding: 0; |
| 128 | box-sizing: border-box; |
| 129 | text-decoration: none; |
| 130 | word-wrap: break-word; |
| 131 | color: var(--darker); |
| 132 | border-bottom: 0; |
| 133 | } |
| 134 | |
| 135 | a:hover { |
| 136 | border-bottom: 1.5px solid var(--gray); |
| 137 | } |
| 138 | |
| 139 | /* index page */ |
| 140 | .index { |
| 141 | width: 100%; |
| 142 | margin-top: 2em; |
| 143 | border-collapse: collapse; |
| 144 | table-layout: auto; |
| 145 | } |
| 146 | |
| 147 | .index th { |
| 148 | text-align: left; |
| 149 | font-weight: 500; |
| 150 | border-bottom: 1.5px solid var(--medium-gray); |
| 151 | padding: 0.25em 0.5em; |
| 152 | } |
| 153 | |
| 154 | .index td { |
| 155 | border-bottom: 1px solid var(--light-gray); |
| 156 | padding: 0.25em 0.5em; |
| 157 | vertical-align: top; |
| 158 | } |
| 159 | |
| 160 | .index .url { white-space: nowrap; } |
| 161 | .index .desc { width: 100%; } |
| 162 | .index .desc .unset { color: var(--gray); } |
| 163 | .index .idle { white-space: nowrap; } |
| 164 | |
| 165 | |
| 166 | .index tbody tr.nohover:hover { |
| 167 | background: transparent; |
| 168 | } |
| 169 | |
| 170 | .index tbody tr:hover { |
| 171 | background: var(--light); |
| 172 | } |
| 173 | |
| 174 | /* tree page */ |
| 175 | |
| 176 | .tree { |
| 177 | width: 100%; |
| 178 | margin-bottom: 2em; |
| 179 | border-collapse: collapse; |
| 180 | table-layout: auto; |
| 181 | } |
| 182 | |
| 183 | .tree th { |
| 184 | text-align: left; |
| 185 | font-weight: 500; |
| 186 | border-bottom: 1.5px solid var(--medium-gray); |
| 187 | padding: 0.25em 0.5em; |
| 188 | } |
| 189 | |
| 190 | .tree td { |
| 191 | border-bottom: 1px solid var(--light-gray); |
| 192 | padding: 0.25em 0.5em; |
| 193 | vertical-align: top; |
| 194 | } |
| 195 | |
| 196 | .tree .mode { |
| 197 | white-space: nowrap; |
| 198 | font-family: var(--mono-font); |
| 199 | } |
| 200 | |
| 201 | .tree .size { |
| 202 | white-space: nowrap; |
| 203 | text-align: right; |
| 204 | font-family: var(--mono-font); |
| 205 | } |
| 206 | |
| 207 | .tree .name { width: 100%; } |
| 208 | |
| 209 | .tree tbody tr.nohover:hover { |
| 210 | background: transparent; |
| 211 | } |
| 212 | |
| 213 | .tree tbody tr:hover { |
| 214 | background: var(--light); |
| 215 | } |
| 216 | |
| 217 | /* log/repo page */ |
| 218 | |
| 219 | .repo-index { |
| 220 | display: flex; |
| 221 | gap: 1.25rem; |
| 222 | margin-bottom: 2em; |
| 223 | align-items: flex-start; |
| 224 | } |
| 225 | |
| 226 | .repo-index-main { |
| 227 | flex: 0 0 72ch; |
| 228 | } |
| 229 | |
| 230 | .repo-index-side { |
| 231 | flex: 0 0 26rem; |
| 232 | min-width: 0; |
| 233 | } |
| 234 | |
| 235 | .repo-index-side h2 { |
| 236 | font-size: 1.4rem; |
| 237 | padding: 0; |
| 238 | } |
| 239 | |
| 240 | .repo-index-main .box { |
| 241 | width: 100%; |
| 242 | } |
| 243 | |
| 244 | .box { |
| 245 | background: var(--light-gray); |
| 246 | padding: 0.6rem; |
| 247 | } |
| 248 | |
| 249 | .box + .box { |
| 250 | margin-top: 0.8rem; |
| 251 | } |
| 252 | |
| 253 | .log { |
| 254 | width: 100%; |
| 255 | margin-bottom: 2em; |
| 256 | border-collapse: collapse; |
| 257 | table-layout: auto; |
| 258 | } |
| 259 | |
| 260 | .log th { |
| 261 | text-align: left; |
| 262 | font-weight: 500; |
| 263 | border-bottom: 1.5px solid var(--medium-gray); |
| 264 | padding: 0.25em 0.5em; |
| 265 | } |
| 266 | |
| 267 | .log td { |
| 268 | border-bottom: 1px solid var(--light-gray); |
| 269 | padding: 0.25em 0.5em; |
| 270 | vertical-align: top; |
| 271 | } |
| 272 | |
| 273 | .log .msg { width: 100%; } |
| 274 | .log .author { white-space: nowrap; position: relative; } |
| 275 | .log .age { white-space: nowrap; } |
| 276 | |
| 277 | .log td.author .author-short { |
| 278 | display: inline-block; |
| 279 | max-width: 25ch; |
| 280 | white-space: nowrap; |
| 281 | overflow: hidden; |
| 282 | text-overflow: ellipsis; |
| 283 | vertical-align: top; |
| 284 | } |
| 285 | |
| 286 | /* Unified tooltip system */ |
| 287 | .tooltip { |
| 288 | display: none; |
| 289 | position: absolute; |
| 290 | left: 0; |
| 291 | top: 100%; |
| 292 | margin-top: 0.25rem; |
| 293 | padding: 0.5rem 0.7rem; |
| 294 | background: var(--white); |
| 295 | border: 1px solid var(--medium-gray); |
| 296 | border-radius: 4px; |
| 297 | box-shadow: 0 2px 8px rgba(0,0,0,0.1); |
| 298 | z-index: 10; |
| 299 | font-size: 0.85em; |
| 300 | line-height: 1.3; |
| 301 | max-width: 48ch; |
| 302 | white-space: nowrap; |
| 303 | } |
| 304 | |
| 305 | .author, .age { position: relative; } |
| 306 | .author:hover .tooltip, |
| 307 | .author:focus-within .tooltip, |
| 308 | .age:hover .tooltip, |
| 309 | .age:focus-within .tooltip { |
| 310 | display: block; |
| 311 | } |
| 312 | |
| 313 | .log tbody tr.nohover:hover { |
| 314 | background: transparent; |
| 315 | } |
| 316 | |
| 317 | .log tbody tr:hover { |
| 318 | background: var(--light); |
| 319 | } |
| 320 | |
| 321 | .clone-url pre { |
| 322 | overflow-x: auto; |
| 323 | white-space: pre; |
| 324 | max-width: 100%; |
| 325 | } |
| 326 | |
| 327 | .mode, .size { |
| 328 | font-family: var(--mono-font); |
| 329 | } |
| 330 | .size { |
| 331 | text-align: right; |
| 332 | } |
| 333 | |
| 334 | /* readme stuff */ |
| 335 | |
| 336 | .readme pre { |
| 337 | white-space: pre-wrap; |
| 338 | overflow-x: auto; |
| 339 | } |
| 340 | |
| 341 | .readme { |
| 342 | background: var(--light-gray); |
| 343 | padding: 0.5rem; |
| 344 | } |
| 345 | |
| 346 | .readme ul { |
| 347 | padding: revert; |
| 348 | } |
| 349 | |
| 350 | .readme img { |
| 351 | max-width: 100%; |
| 352 | } |
| 353 | |
| 354 | .diff { |
| 355 | margin: 1rem 0 1rem 0; |
| 356 | padding: 0.6rem; |
| 357 | border-bottom: 1.5px solid var(--medium-gray); |
| 358 | background: var(--light-gray); |
| 359 | } |
| 360 | |
| 361 | .diff pre { |
| 362 | overflow-x: auto; |
| 363 | } |
| 364 | |
| 365 | .commit-refs { |
| 366 | border-collapse: collapse; |
| 367 | margin: 0.5rem 0 1rem 0; |
| 368 | } |
| 369 | |
| 370 | .commit-refs td { |
| 371 | padding: 0.15rem 0.5rem 0.15rem 0; |
| 372 | vertical-align: top; |
| 373 | } |
| 374 | |
| 375 | .commit-refs td.label { |
| 376 | white-space: nowrap; |
| 377 | padding-right: 1rem; |
| 378 | } |
| 379 | |
| 380 | .diff-stat { |
| 381 | padding: 1rem 0 1rem 0; |
| 382 | } |
| 383 | |
| 384 | .jump { |
| 385 | margin-top: 0.5rem; |
| 386 | } |
| 387 | |
| 388 | .jump-table { |
| 389 | width: 100%; |
| 390 | border-collapse: collapse; |
| 391 | table-layout: auto; |
| 392 | margin-top: 0.25rem; |
| 393 | } |
| 394 | |
| 395 | .jump-table td { |
| 396 | padding: 0.15rem 0.5rem; |
| 397 | border-bottom: 1px solid var(--medium-gray); |
| 398 | vertical-align: top; |
| 399 | } |
| 400 | |
| 401 | .jump-table .diff-type { |
| 402 | font-family: var(--mono-font); |
| 403 | white-space: nowrap; |
| 404 | width: 2ch; |
| 405 | } |
| 406 | |
| 407 | .jump-table .path { |
| 408 | width: 100%; |
| 409 | } |
| 410 | |
| 411 | .commit-hash, .commit-email { |
| 412 | font-family: var(--mono-font); |
| 413 | } |
| 414 | |
| 415 | .commit-email:before { |
| 416 | content: '<'; |
| 417 | } |
| 418 | |
| 419 | .commit-email:after { |
| 420 | content: '>'; |
| 421 | } |
| 422 | |
| 423 | .commit { |
| 424 | margin-bottom: 1rem; |
| 425 | } |
| 426 | |
| 427 | .commit pre { |
| 428 | padding-bottom: 0; |
| 429 | white-space: pre-wrap; |
| 430 | } |
| 431 | |
| 432 | .commit-message { |
| 433 | margin-top: 0.25rem; |
| 434 | font-size: 1rem; |
| 435 | line-height: 1.35; |
| 436 | margin-bottom: 0; |
| 437 | } |
| 438 | |
| 439 | .commit .box { |
| 440 | margin-bottom: 0.25rem; |
| 441 | } |
| 442 | |
| 443 | .commit .commit-info { |
| 444 | padding-bottom: 0.25rem; |
| 445 | } |
| 446 | |
| 447 | .diff-add { |
| 448 | color: green; |
| 449 | } |
| 450 | |
| 451 | .diff-del { |
| 452 | color: red; |
| 453 | } |
| 454 | |
| 455 | .diff-noop { |
| 456 | color: var(--gray); |
| 457 | } |
| 458 | |
| 459 | .ref { |
| 460 | font-family: var(--sans-font); |
| 461 | font-size: 1rem; |
| 462 | color: var(--gray); |
| 463 | display: inline-block; |
| 464 | padding-top: 0.7em; |
| 465 | } |
| 466 | |
| 467 | .refs pre { |
| 468 | white-space: pre-wrap; |
| 469 | padding-bottom: 0.5rem; |
| 470 | } |
| 471 | |
| 472 | .refs strong { |
| 473 | padding-right: 1em; |
| 474 | } |
| 475 | |
| 476 | .line-numbers { |
| 477 | white-space: pre-line; |
| 478 | -moz-user-select: -moz-none; |
| 479 | -khtml-user-select: none; |
| 480 | -webkit-user-select: none; |
| 481 | -o-user-select: none; |
| 482 | user-select: none; |
| 483 | display: flex; |
| 484 | float: left; |
| 485 | flex-direction: column; |
| 486 | margin-right: 1ch; |
| 487 | } |
| 488 | |
| 489 | .file-wrapper { |
| 490 | display: flex; |
| 491 | flex-direction: row; |
| 492 | grid-template-columns: 1rem minmax(0, 1fr); |
| 493 | gap: 1rem; |
| 494 | padding: 0.5rem; |
| 495 | background: var(--light-gray); |
| 496 | overflow-x: auto; |
| 497 | } |
| 498 | |
| 499 | .file-content { |
| 500 | background: var(--light-gray); |
| 501 | overflow-y: hidden; |
| 502 | overflow-x: auto; |
| 503 | } |
| 504 | |
| 505 | .diff-type { |
| 506 | font-family: var(--mono-font); |
| 507 | } |
| 508 | |
| 509 | .diff-type.diff-add { color: green; } |
| 510 | .diff-type.diff-del { color: red; } |
| 511 | .diff-type.diff-mod { color: var(--cyan); } |
| 512 | |
| 513 | .commit-info { |
| 514 | color: var(--gray); |
| 515 | font-size: 0.85rem; |
| 516 | } |
| 517 | |
| 518 | .commit-date { |
| 519 | float: right; |
| 520 | } |
| 521 | |
| 522 | @media (max-width: 600px) { |
| 523 | .index { |
| 524 | grid-row-gap: 0.8em; |
| 525 | } |
| 526 | |
| 527 | .repo-index { |
| 528 | flex-direction: column; |
| 529 | } |
| 530 | |
| 531 | .repo-index-main { |
| 532 | flex: none; |
| 533 | } |
| 534 | |
| 535 | .repo-index-side { |
| 536 | flex: none; |
| 537 | } |
| 538 | |
| 539 | .log { |
| 540 | grid-template-columns: 1fr; |
| 541 | grid-row-gap: 0em; |
| 542 | } |
| 543 | |
| 544 | .index { |
| 545 | grid-template-columns: 1fr; |
| 546 | grid-row-gap: 0em; |
| 547 | } |
| 548 | |
| 549 | .index-name:not(:first-child) { |
| 550 | padding-top: 1.5rem; |
| 551 | } |
| 552 | |
| 553 | .commit-info:not(:last-child) { |
| 554 | padding-bottom: 1.5rem; |
| 555 | } |
| 556 | |
| 557 | pre { |
| 558 | font-size: 0.8rem; |
| 559 | } |
| 560 | } |