mugit/web/static/style.css (view raw)
Oleksandr Smirnov
Oleksandr Smirnov
olexsmir@gmail.com ui: align readme with rest of ui, 4 months ago
olexsmir@gmail.com ui: align readme with rest of ui, 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 | --diff-add: green; |
| 11 | --diff-del: red; |
| 12 | |
| 13 | --sans-font: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", "Segoe UI", sans-serif; |
| 14 | --mono-font: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', 'Roboto Mono', Menlo, Consolas, monospace; |
| 15 | } |
| 16 | |
| 17 | @media (prefers-color-scheme: dark) { |
| 18 | :root { |
| 19 | color-scheme: dark light; |
| 20 | --light: #181818; |
| 21 | --cyan: #76c7c0; |
| 22 | --light-gray: #333; |
| 23 | --medium-gray: #444; |
| 24 | --gray: #aaa; |
| 25 | --dark: #ddd; |
| 26 | --darker: #f4f4f4; |
| 27 | --white: #000; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | * { |
| 32 | box-sizing: border-box; |
| 33 | padding: 0; |
| 34 | margin: 0; |
| 35 | } |
| 36 | |
| 37 | html { |
| 38 | background: var(--white); |
| 39 | -webkit-text-size-adjust: none; |
| 40 | -webkit-font-smoothing: antialiased; |
| 41 | -moz-osx-font-smoothing: grayscale; |
| 42 | font-family: var(--sans-font); |
| 43 | font-weight: 400; |
| 44 | } |
| 45 | |
| 46 | body { |
| 47 | max-width: 1200px; |
| 48 | padding: 0 13px; |
| 49 | margin: 40px auto; |
| 50 | } |
| 51 | |
| 52 | ::selection { |
| 53 | background: var(--medium-gray); |
| 54 | } |
| 55 | |
| 56 | a { |
| 57 | text-decoration: none; |
| 58 | word-wrap: break-word; |
| 59 | color: var(--darker); |
| 60 | border-bottom: 0; |
| 61 | } |
| 62 | |
| 63 | a:hover { |
| 64 | border-bottom: 1.5px solid var(--gray); |
| 65 | } |
| 66 | |
| 67 | pre { |
| 68 | font-family: var(--mono-font); |
| 69 | overflow-x: auto; |
| 70 | } |
| 71 | |
| 72 | main, footer { |
| 73 | padding: 0; |
| 74 | line-height: 160%; |
| 75 | } |
| 76 | |
| 77 | h2 { font-weight: 400; } |
| 78 | strong { font-weight: 500; } |
| 79 | |
| 80 | main h1 { padding: 10px 0 10px 0; } |
| 81 | main h2 { font-size: 18px; } |
| 82 | main h3 { font-size: 1.15rem; } |
| 83 | main h2, h3 { padding: 20px 0 0.4rem 0; } |
| 84 | |
| 85 | nav { padding: 0.4rem 0 1.5rem 0; } |
| 86 | nav ul { |
| 87 | list-style: none; |
| 88 | padding-bottom: 20px; |
| 89 | } |
| 90 | |
| 91 | nav ul li { |
| 92 | padding-right: 10px; |
| 93 | display: inline-block; |
| 94 | } |
| 95 | |
| 96 | /* utilities */ |
| 97 | |
| 98 | .nowrap { white-space: nowrap; } |
| 99 | .fill { width: 100%; } |
| 100 | .muted { color: var(--gray); } |
| 101 | |
| 102 | .size { text-align: right; } |
| 103 | |
| 104 | .mode, |
| 105 | .size, |
| 106 | .commit-hash, |
| 107 | .commit-email, |
| 108 | .diff-type { |
| 109 | font-family: var(--mono-font); |
| 110 | } |
| 111 | |
| 112 | /* tables */ |
| 113 | .table { |
| 114 | width: 100%; |
| 115 | border-collapse: collapse; |
| 116 | table-layout: auto; |
| 117 | } |
| 118 | |
| 119 | .table th { |
| 120 | text-align: left; |
| 121 | font-weight: 500; |
| 122 | border-bottom: 1.5px solid var(--medium-gray); |
| 123 | padding: 0.25em 0.5em; |
| 124 | } |
| 125 | |
| 126 | .table td { |
| 127 | border-bottom: 1px solid var(--light-gray); |
| 128 | padding: 0.25em 0.5em; |
| 129 | vertical-align: top; |
| 130 | } |
| 131 | |
| 132 | .table tbody tr:hover { |
| 133 | background: var(--light); |
| 134 | } |
| 135 | |
| 136 | .table tbody tr.nohover:hover { |
| 137 | background: transparent; |
| 138 | } |
| 139 | |
| 140 | /* tooltip */ |
| 141 | .tooltip { |
| 142 | display: none; |
| 143 | position: absolute; |
| 144 | left: 0; |
| 145 | top: 100%; |
| 146 | margin-top: 0.25rem; |
| 147 | padding: 0.5rem 0.7rem; |
| 148 | background: var(--white); |
| 149 | border: 1px solid var(--medium-gray); |
| 150 | border-radius: 4px; |
| 151 | box-shadow: 0 2px 8px rgba(0,0,0,0.1); |
| 152 | z-index: 10; |
| 153 | font-size: 0.85em; |
| 154 | line-height: 1.3; |
| 155 | max-width: 48ch; |
| 156 | white-space: nowrap; |
| 157 | } |
| 158 | |
| 159 | .author, .age { position: relative; } |
| 160 | |
| 161 | .author:hover .tooltip, |
| 162 | .author:focus-within .tooltip, |
| 163 | .age:hover .tooltip, |
| 164 | .age:focus-within .tooltip { |
| 165 | display: block; |
| 166 | } |
| 167 | |
| 168 | /* box */ |
| 169 | .box { |
| 170 | background: var(--light-gray); |
| 171 | padding: 0.6rem; |
| 172 | } |
| 173 | |
| 174 | .box + .box { |
| 175 | margin-top: 0.8rem; |
| 176 | } |
| 177 | |
| 178 | /* repo header */ |
| 179 | .repo-header { margin-bottom: 1.25rem; } |
| 180 | |
| 181 | .repo-breadcrumb, |
| 182 | .repo-breadcrumb a { |
| 183 | color: var(--gray); |
| 184 | } |
| 185 | |
| 186 | .repo-breadcrumb:before { content: "<"; } |
| 187 | |
| 188 | .repo-name { |
| 189 | font-size: 1.6rem; |
| 190 | line-height: 1.1; |
| 191 | margin-top: 0.25rem; |
| 192 | } |
| 193 | |
| 194 | .repo-header .desc { margin-top: 0.35rem; } |
| 195 | .repo-header .repo-nav { padding: 0.5rem 0 0 0; } |
| 196 | .repo-header .repo-nav ul { padding-bottom: 0; } |
| 197 | |
| 198 | /* index page */ |
| 199 | .index { margin-top: 2em; } |
| 200 | |
| 201 | /* repo index */ |
| 202 | .repo-index { |
| 203 | display: flex; |
| 204 | gap: 1.25rem; |
| 205 | align-items: flex-start; |
| 206 | } |
| 207 | |
| 208 | .repo-index-main { |
| 209 | flex: 0 0 72ch; |
| 210 | } |
| 211 | |
| 212 | .repo-index-main .box { |
| 213 | width: 100%; |
| 214 | } |
| 215 | |
| 216 | .repo-index-side { |
| 217 | flex: 0 0 26rem; |
| 218 | min-width: 0; |
| 219 | } |
| 220 | |
| 221 | .repo-index-side h2 { |
| 222 | font-size: 1.4rem; |
| 223 | padding: 0; |
| 224 | } |
| 225 | |
| 226 | /* log page */ |
| 227 | .log td.author .author-short { |
| 228 | display: inline-block; |
| 229 | max-width: 25ch; |
| 230 | overflow: hidden; |
| 231 | text-overflow: ellipsis; |
| 232 | vertical-align: top; |
| 233 | } |
| 234 | |
| 235 | /* tree */ |
| 236 | .tree, |
| 237 | .log, |
| 238 | .repo-index { |
| 239 | margin-bottom: 2em; |
| 240 | } |
| 241 | |
| 242 | /* file View */ |
| 243 | .file-wrapper { |
| 244 | display: flex; |
| 245 | flex-direction: row; |
| 246 | gap: 1rem; |
| 247 | padding: 0 0.5rem; |
| 248 | background: var(--light-gray); |
| 249 | overflow-x: auto; |
| 250 | } |
| 251 | |
| 252 | .line-numbers { |
| 253 | white-space: pre-line; |
| 254 | -moz-user-select: -moz-none; |
| 255 | -khtml-user-select: none; |
| 256 | -webkit-user-select: none; |
| 257 | -o-user-select: none; |
| 258 | user-select: none; |
| 259 | padding-right: 1ch; |
| 260 | } |
| 261 | |
| 262 | .file-content { |
| 263 | padding-left: 1.5ch; |
| 264 | overflow-y: hidden; |
| 265 | overflow-x: auto; |
| 266 | } |
| 267 | |
| 268 | .line-numbers pre, |
| 269 | .file-content pre { |
| 270 | margin: 0; |
| 271 | line-height: 1.5; |
| 272 | } |
| 273 | |
| 274 | /* commit */ |
| 275 | .commit { margin-bottom: 1rem; } |
| 276 | |
| 277 | .commit pre { |
| 278 | padding-bottom: 0; |
| 279 | white-space: pre-wrap; |
| 280 | } |
| 281 | |
| 282 | .commit .box { margin-bottom: 0.25rem; } |
| 283 | .commit .commit-info { |
| 284 | padding-bottom: 0.25rem; |
| 285 | } |
| 286 | |
| 287 | .commit-message { |
| 288 | margin-top: 0.25rem; |
| 289 | font-size: 1rem; |
| 290 | line-height: 1.35; |
| 291 | margin-bottom: 0; |
| 292 | } |
| 293 | |
| 294 | .commit-info { |
| 295 | color: var(--gray); |
| 296 | font-size: 0.85rem; |
| 297 | } |
| 298 | |
| 299 | .commit-date { float: right; } |
| 300 | |
| 301 | .commit-email:before { content: '<'; } |
| 302 | .commit-email:after { content: '>'; } |
| 303 | |
| 304 | .commit-refs { |
| 305 | margin: 0.5rem 0 1rem 0; |
| 306 | } |
| 307 | |
| 308 | .commit-refs td { |
| 309 | padding: 0.15rem 0.5rem 0.15rem 0; |
| 310 | border: none; |
| 311 | } |
| 312 | |
| 313 | .commit-refs td.label { |
| 314 | padding-right: 1rem; |
| 315 | } |
| 316 | |
| 317 | /* diff */ |
| 318 | .diff { |
| 319 | margin: 1rem 0 1rem 0; |
| 320 | padding: 0.6rem; |
| 321 | border-bottom: 1.5px solid var(--medium-gray); |
| 322 | background: var(--light-gray); |
| 323 | } |
| 324 | |
| 325 | .diff-stat { padding: 1rem 0 1rem 0; } |
| 326 | .diff-add { color: var(--diff-add); } |
| 327 | .diff-del { color: var(--diff-del); } |
| 328 | .diff-mod { color: var(--cyan); } |
| 329 | .diff-noop { color: var(--gray); } |
| 330 | |
| 331 | .jump { margin-top: 0.5rem; } |
| 332 | .jump-table { margin-top: 0.25rem; } |
| 333 | |
| 334 | .jump-table td { |
| 335 | padding: 0.15rem 0.5rem; |
| 336 | border-color: var(--medium-gray); |
| 337 | } |
| 338 | |
| 339 | .jump-table .diff-type { |
| 340 | width: 2ch; |
| 341 | } |
| 342 | |
| 343 | /* refs */ |
| 344 | .ref { |
| 345 | font-size: 1rem; |
| 346 | color: var(--gray); |
| 347 | display: inline-block; |
| 348 | padding-top: 0.7em; |
| 349 | } |
| 350 | |
| 351 | .refs pre { |
| 352 | padding-bottom: 0.5rem; |
| 353 | white-space: pre-wrap; |
| 354 | } |
| 355 | |
| 356 | .refs strong { |
| 357 | padding-right: 1em; |
| 358 | } |
| 359 | |
| 360 | /* readme */ |
| 361 | .readme { padding: 0.6rem 0; } |
| 362 | .readme pre { white-space: pre-wrap; } |
| 363 | .readme ul { padding: revert; } |
| 364 | .readme img { max-width: 100%; } |
| 365 | |
| 366 | @media (max-width: 600px) { |
| 367 | .repo-index { |
| 368 | flex-direction: column; |
| 369 | } |
| 370 | |
| 371 | .repo-index-main, |
| 372 | .repo-index-side { |
| 373 | flex: none; |
| 374 | width: 100%; |
| 375 | } |
| 376 | |
| 377 | .commit-info:not(:last-child) { |
| 378 | padding-bottom: 1.5rem; |
| 379 | } |
| 380 | |
| 381 | pre { |
| 382 | font-size: 0.8rem; |
| 383 | } |
| 384 | } |