gitile.css
| 1 | /* |
| 2 | * SPDX-FileCopyrightText: 2020, 2021 Julien Lepiller <julien@lepiller.eu> |
| 3 | * |
| 4 | * SPDX-License-Identifier: CC0-1.0 |
| 5 | */ |
| 6 | |
| 7 | :root { |
| 8 | --font-base: 14px; |
| 9 | --font-sans: "DejaVu Sans", "Noto Sans", sans-serif; |
| 10 | --font-mono: "DejaVu Sans Mono", "Noto Sans Mono", monospace; |
| 11 | |
| 12 | /* header colors */ |
| 13 | --blue: #6eaee6; |
| 14 | --darkblue: #176ecb; |
| 15 | --lightblue: #a1d9f4; |
| 16 | --top-link-white: #fff; |
| 17 | |
| 18 | /* footer */ |
| 19 | --darkgreen: #2cae0e; |
| 20 | |
| 21 | /* elements */ |
| 22 | --white: #fff; |
| 23 | --darkwhite: #faf5f0; |
| 24 | --darkerwhite: #eae5e0; |
| 25 | --gray: #ccc; |
| 26 | --lighterblack: #777; |
| 27 | --black: #333; |
| 28 | |
| 29 | /* diffs */ |
| 30 | --lightgreen: #ddfbe6; |
| 31 | --lightergreen: #ecfdf0; |
| 32 | --bordergreen: #b0eab9; |
| 33 | |
| 34 | --lightred: #f9d7dc; |
| 35 | --lighterred: #fbe9eb; |
| 36 | --borderred: #eac0c9; |
| 37 | |
| 38 | --hunk-delim: #fafafa; |
| 39 | --diff-name-background: #cccac5; |
| 40 | |
| 41 | /* code blocks in readme */ |
| 42 | --code-color: #353; |
| 43 | --code-background: #ded; |
| 44 | --code-shadow: #efe; |
| 45 | --code-border: #bdb; |
| 46 | --pre-shadow: #efe; |
| 47 | --pre-border: #bdb; |
| 48 | } |
| 49 | |
| 50 | @media screen and (prefers-color-scheme: dark) { |
| 51 | :root { |
| 52 | --blue: #0e2e46; |
| 53 | --darkblue: #1e3e56; |
| 54 | --lightblue: #073766; |
| 55 | --top-link-white: #d0daff; |
| 56 | |
| 57 | --darkgreen: #2cae0e; |
| 58 | |
| 59 | --white: #000; |
| 60 | --darkwhite: #110d0a; |
| 61 | --darkerwhite: #151311; |
| 62 | --gray: #333; |
| 63 | --lighterblack: #777; |
| 64 | --black: #ddd; |
| 65 | |
| 66 | --lightgreen: #0d2b16; |
| 67 | --lightergreen: #0c1d10; |
| 68 | --bordergreen: #304a39; |
| 69 | |
| 70 | --lightred: #29070c; |
| 71 | --lighterred: #1b090b; |
| 72 | --borderred: #4a3039; |
| 73 | |
| 74 | --hunk-delim: #0a0a0a; |
| 75 | --diff-name-background: #3c3a35; |
| 76 | |
| 77 | --code-color: #ded; |
| 78 | --code-background: #111511; |
| 79 | --code-shadow: #010; |
| 80 | --code-border: #343; |
| 81 | --pre-shadow: #232; |
| 82 | --pre-border: #343; |
| 83 | } |
| 84 | |
| 85 | a { |
| 86 | color: #81b9e4; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | html, body { |
| 91 | margin: 0; |
| 92 | padding: 0; |
| 93 | min-height: 100%; |
| 94 | background: var(--darkwhite); |
| 95 | font-family: var(--font-sans); |
| 96 | font-size: var(--font-base); |
| 97 | } |
| 98 | |
| 99 | body { |
| 100 | display: flex; |
| 101 | flex-direction: column; |
| 102 | color: var(--black); |
| 103 | height: 100%; |
| 104 | } |
| 105 | |
| 106 | #content { |
| 107 | flex: 1; |
| 108 | width: 1200px; |
| 109 | margin: auto; |
| 110 | text-align: justify; |
| 111 | line-height: 1.25em; |
| 112 | padding: 2em; |
| 113 | } |
| 114 | |
| 115 | header { |
| 116 | background: var(--blue); |
| 117 | } |
| 118 | |
| 119 | footer { |
| 120 | background: var(--darkerwhite); |
| 121 | } |
| 122 | |
| 123 | header, footer { |
| 124 | text-align: center; |
| 125 | } |
| 126 | |
| 127 | a { |
| 128 | text-decoration: none; |
| 129 | } |
| 130 | |
| 131 | header ul { |
| 132 | list-style: none; |
| 133 | margin: 0; |
| 134 | } |
| 135 | |
| 136 | header li { |
| 137 | display: inline-block; |
| 138 | } |
| 139 | |
| 140 | header li a { |
| 141 | display: inline-block; |
| 142 | padding: 1em; |
| 143 | color: var(--top-link-white); |
| 144 | } |
| 145 | |
| 146 | header li a:hover { |
| 147 | background-color: var(--darkblue); |
| 148 | } |
| 149 | |
| 150 | header li.first { |
| 151 | margin-right: 2em; |
| 152 | } |
| 153 | |
| 154 | footer a { |
| 155 | color: var(--darkgreen); |
| 156 | } |
| 157 | |
| 158 | .content { |
| 159 | display: flex; |
| 160 | flex-direction: row; |
| 161 | align-items: center; |
| 162 | } |
| 163 | |
| 164 | .content p:first-child { |
| 165 | flex: 1; |
| 166 | } |
| 167 | |
| 168 | .content img { |
| 169 | max-height: 1.5em; |
| 170 | max-width: 1.5em; |
| 171 | } |
| 172 | |
| 173 | .content p { |
| 174 | margin: 0; |
| 175 | } |
| 176 | |
| 177 | .content, thead { |
| 178 | background: var(--darkerwhite); |
| 179 | padding: 0.5em; |
| 180 | margin: 0; |
| 181 | border: 1px solid var(--gray); |
| 182 | border-bottom: none; |
| 183 | } |
| 184 | |
| 185 | pre, article.formatted-file-content { |
| 186 | border: 1px solid var(--gray); |
| 187 | border-top: none; |
| 188 | padding: 0.5em; |
| 189 | margin: 0; |
| 190 | background: var(--white); |
| 191 | } |
| 192 | |
| 193 | pre { |
| 194 | font-family: var(--font-mono); |
| 195 | } |
| 196 | |
| 197 | article.formatted-file-content > * { |
| 198 | margin-left: auto; |
| 199 | margin-right: auto; |
| 200 | } |
| 201 | |
| 202 | .formatted-file-content ul { |
| 203 | padding-left: 1em; |
| 204 | } |
| 205 | |
| 206 | .formatted-file-content pre { |
| 207 | border: 1px solid var(--pre-border); |
| 208 | box-shadow: 1px 1px 0 var(--pre-shadow); |
| 209 | overflow: auto; |
| 210 | color: #353; |
| 211 | } |
| 212 | |
| 213 | .formatted-file-content h1 { |
| 214 | text-align: left; |
| 215 | padding-bottom: 0.3em; |
| 216 | border-bottom: 1px solid #ddd; |
| 217 | } |
| 218 | |
| 219 | .formatted-file-content h2 { |
| 220 | padding-bottom: 0.2em; |
| 221 | border-bottom: 1px solid #ddd; |
| 222 | } |
| 223 | |
| 224 | article.formatted-file-content { |
| 225 | padding: 1em 5em; |
| 226 | } |
| 227 | |
| 228 | table { |
| 229 | background: var(--white); |
| 230 | border-collapse: collapse; |
| 231 | width: 100%; |
| 232 | border: 1px solid var(--gray); |
| 233 | margin-bottom: 1em; |
| 234 | font-size: var(--font-base); |
| 235 | } |
| 236 | |
| 237 | table.file-diff { |
| 238 | font-family: var(--font-mono); |
| 239 | } |
| 240 | |
| 241 | tbody tr { |
| 242 | transition-duration: 300ms; |
| 243 | } |
| 244 | |
| 245 | tbody tr:hover { |
| 246 | background: var(--lightblue); |
| 247 | } |
| 248 | |
| 249 | td { |
| 250 | padding: 0.5em; |
| 251 | } |
| 252 | |
| 253 | table.file-diff, table.file-content { |
| 254 | margin-bottom: 1em; |
| 255 | user-select: none; |
| 256 | } |
| 257 | |
| 258 | table.file-diff td, table.file-content td { |
| 259 | padding: 0; |
| 260 | line-height: 1em; |
| 261 | } |
| 262 | |
| 263 | table.file-diff td:target + td, table.file-content td:target + td { |
| 264 | background: #ffffd0; |
| 265 | } |
| 266 | |
| 267 | table.file-diff .hunk-delim { |
| 268 | background: var(--hunk-delim); |
| 269 | border-bottom: 1px solid var(--darkerwhite); |
| 270 | border-top: 1px solid var(--darkerwhite); |
| 271 | text-align: center; |
| 272 | } |
| 273 | |
| 274 | table.file-diff .hunk-delim td { |
| 275 | padding: 0.25em; |
| 276 | } |
| 277 | |
| 278 | table.file-diff .diff-no-data { |
| 279 | background: var(--darkerwhite); |
| 280 | } |
| 281 | |
| 282 | table.file-diff .diff-no-data td { |
| 283 | padding: 1em; |
| 284 | user-select: text; |
| 285 | text-align: center; |
| 286 | } |
| 287 | |
| 288 | table.file-diff td:nth-child(3) { |
| 289 | text-align: center; |
| 290 | } |
| 291 | |
| 292 | table.file-diff .diff-line-num, table.file-content .content-line-num { |
| 293 | background: var(--darkerwhite); |
| 294 | color: var(--lighterblack); |
| 295 | text-align: center; |
| 296 | border-right: 1px solid var(--gray); |
| 297 | border-left: 1px solid var(--gray); |
| 298 | } |
| 299 | |
| 300 | table.file-diff .diff-line, table.file-content .content-line { |
| 301 | border-right: 1px solid var(--gray); |
| 302 | user-select: text; |
| 303 | } |
| 304 | |
| 305 | table.file-diff pre, table.file-content pre { |
| 306 | border: none; |
| 307 | background: none; |
| 308 | padding: 0.2em; |
| 309 | } |
| 310 | |
| 311 | table.file-diff .diff-minus, |
| 312 | table.file-diff .diff-minus:hover { |
| 313 | background: var(--lighterred); |
| 314 | border-color: var(--red); |
| 315 | } |
| 316 | |
| 317 | table.file-diff .diff-plus, |
| 318 | table.file-diff .diff-plus:hover{ |
| 319 | background: var(--lightergreen); |
| 320 | } |
| 321 | |
| 322 | table.file-diff tr:hover, table.file-content tr:hover { |
| 323 | background: none; |
| 324 | } |
| 325 | |
| 326 | table.file-diff .diff-minus .diff-line-num { |
| 327 | background: var(--lightred); |
| 328 | } |
| 329 | |
| 330 | table.file-diff .diff-plus .diff-line-num { |
| 331 | background: var(--lightgreen); |
| 332 | } |
| 333 | |
| 334 | table.file-diff .diff-minus td { |
| 335 | border-color: var(--borderred); |
| 336 | } |
| 337 | |
| 338 | table.file-diff .diff-plus td { |
| 339 | border-color: var(--bordergreen); |
| 340 | } |
| 341 | |
| 342 | p.diff-file-name { |
| 343 | background: var(--diff-name-background); |
| 344 | margin: 0; |
| 345 | padding: 0.5em; |
| 346 | border: 1px solid var(--gray); |
| 347 | border-bottom: none; |
| 348 | } |
| 349 | |
| 350 | .commit-info, .tag-box { |
| 351 | border: 1px solid var(--gray); |
| 352 | margin-top: 1em; |
| 353 | margin-bottom: 1em; |
| 354 | padding: 1em; |
| 355 | display: flex; |
| 356 | flex-direction: row; |
| 357 | justify-content: center; |
| 358 | align-content: center; |
| 359 | background: var(--white); |
| 360 | } |
| 361 | |
| 362 | .commit-info .commit, .tag-box .tag { |
| 363 | flex: 1 |
| 364 | } |
| 365 | |
| 366 | .commit-info .message, .tag-box .tag-name { |
| 367 | font-weight: bold; |
| 368 | } |
| 369 | |
| 370 | .commit-info .author, .commit-info .date, .tag-box .date { |
| 371 | display: inline-block; |
| 372 | padding: 0.5em 0; |
| 373 | } |
| 374 | |
| 375 | .tag-box .tag p { |
| 376 | margin: 0; |
| 377 | } |
| 378 | |
| 379 | .tag-box img { |
| 380 | margin-right: 0.5em; |
| 381 | } |
| 382 | |
| 383 | .commit-info img { |
| 384 | max-width: 64px; |
| 385 | max-height: 64px; |
| 386 | margin-right: 1em; |
| 387 | } |
| 388 | |
| 389 | .commit-info .commit-id { |
| 390 | margin-left: 1em; |
| 391 | border: 1px solid var(--gray); |
| 392 | padding: 0; |
| 393 | background: var(--darkerwhite); |
| 394 | height: 2.5em; |
| 395 | display: flex; |
| 396 | flex-direction: row; |
| 397 | align-items: stretch; |
| 398 | overflow: hidden; |
| 399 | } |
| 400 | |
| 401 | .commit-info .commit-id .short-id { |
| 402 | background: var(--darkwhite); |
| 403 | display: inline-block; |
| 404 | padding: 0 0.5em; |
| 405 | border-right: 1px solid var(--gray); |
| 406 | font-family: var(--font-mono); |
| 407 | display: flex; |
| 408 | align-items: center; |
| 409 | } |
| 410 | |
| 411 | .commit-info p { |
| 412 | margin: 0; |
| 413 | } |
| 414 | |
| 415 | .commit-info .commit-id button { |
| 416 | background: none; |
| 417 | border: none; |
| 418 | cursor: pointer; |
| 419 | } |
| 420 | |
| 421 | .commit-info .commit-id img { |
| 422 | max-width: 1.5em; |
| 423 | max-height: 1.5em; |
| 424 | margin-right: 0.3em; |
| 425 | } |
| 426 | |
| 427 | .commit-info .commit-id a { |
| 428 | display: flex; |
| 429 | align-items: center; |
| 430 | } |
| 431 | |
| 432 | .commit-info .date, .tag-box .date { |
| 433 | font-style: italic; |
| 434 | margin-left: 1em; |
| 435 | } |
| 436 | |
| 437 | .commit-info .author::before, .tag-box .author::before { |
| 438 | content: "Authored by: "; |
| 439 | } |
| 440 | |
| 441 | h1 { |
| 442 | text-align: center; |
| 443 | } |
| 444 | |
| 445 | code { |
| 446 | background: var(--darkerwhite); |
| 447 | display: inline-block; |
| 448 | padding: 3px; |
| 449 | font-family: var(--font-mono); |
| 450 | } |
| 451 | |
| 452 | .formatted-file-content pre code { |
| 453 | padding: 0; |
| 454 | background: none; |
| 455 | box-shadow: none; |
| 456 | display: block; |
| 457 | color: var(--black); |
| 458 | } |
| 459 | |
| 460 | .formatted-file-content code { |
| 461 | background: var(--code-background); |
| 462 | padding: 0.15em; |
| 463 | display: inline-block; |
| 464 | box-shadow: 1px 1px 1px var(--code-shadow); |
| 465 | color: var(--code-color); |
| 466 | } |
| 467 | |
| 468 | .clone { |
| 469 | text-align: right; |
| 470 | } |
| 471 | |
| 472 | .icon-link { |
| 473 | display: flex; |
| 474 | flex-direction: row; |
| 475 | align-content: center; |
| 476 | } |
| 477 | |
| 478 | .icon-link img { |
| 479 | height: 1em; |
| 480 | width: 1em; |
| 481 | margin-right: 0.3em; |
| 482 | } |
| 483 | |
| 484 | .path-box a { |
| 485 | display: inline-block; |
| 486 | padding: 0.5em; |
| 487 | } |
| 488 | |
| 489 | .button-row a { |
| 490 | display: inline-block; |
| 491 | background: var(--white); |
| 492 | padding: 0.5em; |
| 493 | border: 1px solid var(--gray); |
| 494 | margin: 0.5em; |
| 495 | } |
| 496 | |
| 497 | |
| 498 | /* syntax highlighting */ |
| 499 | .syntax-comment { |
| 500 | color: var(--comment); |
| 501 | } |
| 502 | |
| 503 | .syntax-string { |
| 504 | color: var(--string); |
| 505 | } |
| 506 | |
| 507 | /* for scheme */ |
| 508 | .syntax-special { |
| 509 | color: var(--keyword2); |
| 510 | font-weight: bold; |
| 511 | } |
| 512 | |
| 513 | .syntax-keyword { |
| 514 | color: var(--keyword); |
| 515 | font-weight: bold; |
| 516 | } |
| 517 | |
| 518 | @media screen and (max-width: 1250px) { |
| 519 | #content { |
| 520 | width: 100%; |
| 521 | padding: 0; |
| 522 | } |
| 523 | article.formatted-file-content { |
| 524 | padding: 0.25em; |
| 525 | } |
| 526 | } |
| 527 |