Update css
assets/css/gitile.css
| 15 | 15 | --lightgreen: #ddfbe6; | |
| 16 | 16 | --bordergreen: #b0eab9; | |
| 17 | 17 | --borderred: #eac0c9; | |
| 18 | + | ||
| 19 | + | /* syntax highlighting */ | |
| 20 | + | --comment: #777; | |
| 21 | + | --string: #b22; | |
| 22 | + | --keyword: #35a; | |
| 23 | + | --keyword2: #732; | |
| 18 | 24 | } | |
| 19 | 25 | ||
| 20 | 26 | html, body { | |
… | |||
| 36 | 42 | width: 1200px; | |
| 37 | 43 | margin: auto; | |
| 38 | 44 | text-align: justify; | |
| 39 | - | line-height: 1.5em; | |
| 45 | + | line-height: 1.25em; | |
| 40 | 46 | padding: 2em; | |
| 41 | 47 | } | |
| 42 | 48 | ||
… | |||
| 110 | 116 | border-bottom: none; | |
| 111 | 117 | } | |
| 112 | 118 | ||
| 113 | - | pre { | |
| 119 | + | pre, article.formatted-file-content { | |
| 114 | 120 | border: 1px solid var(--gray); | |
| 115 | 121 | border-top: none; | |
| 116 | 122 | padding: 0.5em; | |
… | |||
| 121 | 127 | font-family: monospace, monospace; | |
| 122 | 128 | } | |
| 123 | 129 | ||
| 130 | + | .formatted-file-content pre { | |
| 131 | + | border: 1px solid #ddd; | |
| 132 | + | box-shadow: 1px 1px 0 #eee; | |
| 133 | + | overflow: auto; | |
| 134 | + | } | |
| 135 | + | ||
| 136 | + | .formatted-file-content h1 { | |
| 137 | + | text-align: left; | |
| 138 | + | border-bottom: 1px solid #ddd; | |
| 139 | + | } | |
| 140 | + | ||
| 141 | + | .formatted-file-content h2 { | |
| 142 | + | border-bottom: 1px solid #ddd; | |
| 143 | + | } | |
| 144 | + | ||
| 145 | + | article.formatted-file-content { | |
| 146 | + | font-family: inherit; | |
| 147 | + | font-size: 0.85em; | |
| 148 | + | line-height: inherit; | |
| 149 | + | padding: 1em 5em; | |
| 150 | + | } | |
| 151 | + | ||
| 124 | 152 | table { | |
| 125 | 153 | background: var(--white); | |
| 126 | 154 | border-collapse: collapse; | |
| 127 | 155 | width: 100%; | |
| 128 | 156 | border: 1px solid var(--gray); | |
| 157 | + | margin-bottom: 1em; | |
| 129 | 158 | } | |
| 130 | 159 | ||
| 131 | 160 | tbody tr { | |
… | |||
| 140 | 169 | padding: 0.5em; | |
| 141 | 170 | } | |
| 142 | 171 | ||
| 143 | - | table.file-diff { | |
| 172 | + | table.file-diff, table.file-content { | |
| 144 | 173 | margin-bottom: 1em; | |
| 145 | 174 | user-select: none; | |
| 146 | 175 | } | |
| 147 | 176 | ||
| 148 | - | table.file-diff td { | |
| 177 | + | table.file-diff td, table.file-content td { | |
| 149 | 178 | padding: 0; | |
| 150 | 179 | line-height: 1em; | |
| 151 | 180 | } | |
… | |||
| 176 | 205 | text-align: center; | |
| 177 | 206 | } | |
| 178 | 207 | ||
| 179 | - | table.file-diff .diff-line-num { | |
| 208 | + | table.file-diff .diff-line-num, table.file-content .content-line-num { | |
| 180 | 209 | background: var(--darkerwhite); | |
| 181 | 210 | color: var(--lighterblack); | |
| 182 | - | } | |
| 183 | - | ||
| 184 | - | table.file-diff .diff-line-num { | |
| 185 | 211 | font-family: monospace; | |
| 186 | 212 | text-align: center; | |
| 187 | 213 | border-right: 1px solid var(--gray); | |
| 188 | 214 | border-left: 1px solid var(--gray); | |
| 189 | 215 | } | |
| 190 | 216 | ||
| 191 | - | table.file-diff .diff-line { | |
| 217 | + | table.file-diff .diff-line, table.file-content .content-line { | |
| 192 | 218 | border-right: 1px solid var(--gray); | |
| 193 | 219 | user-select: text; | |
| 194 | 220 | } | |
| 195 | 221 | ||
| 196 | - | table.file-diff pre { | |
| 222 | + | table.file-diff pre, table.file-content pre { | |
| 197 | 223 | border: none; | |
| 198 | 224 | background: none; | |
| 199 | 225 | } | |
… | |||
| 209 | 235 | background: var(--lightergreen); | |
| 210 | 236 | } | |
| 211 | 237 | ||
| 212 | - | table.file-diff tr:hover { | |
| 238 | + | table.file-diff tr:hover, table.file-content tr:hover { | |
| 213 | 239 | background: none; | |
| 214 | 240 | } | |
| 215 | 241 | ||
… | |||
| 336 | 362 | font-size: 0.85em; | |
| 337 | 363 | } | |
| 338 | 364 | ||
| 365 | + | .formatted-file-content pre code { | |
| 366 | + | font-size: inherit; | |
| 367 | + | font-family: inherit; | |
| 368 | + | padding: 0; | |
| 369 | + | background: none; | |
| 370 | + | display: block; | |
| 371 | + | } | |
| 372 | + | ||
| 373 | + | .formatted-file-content code { | |
| 374 | + | background: none; | |
| 375 | + | padding: 0; | |
| 376 | + | display: inline; | |
| 377 | + | } | |
| 378 | + | ||
| 339 | 379 | .clone { | |
| 340 | 380 | text-align: right; | |
| 341 | 381 | } | |
… | |||
| 366 | 406 | } | |
| 367 | 407 | ||
| 368 | 408 | ||
| 409 | + | /* syntax highlighting */ | |
| 410 | + | .syntax-comment { | |
| 411 | + | color: var(--comment); | |
| 412 | + | } | |
| 413 | + | ||
| 414 | + | .syntax-string { | |
| 415 | + | color: var(--string); | |
| 416 | + | } | |
| 417 | + | ||
| 418 | + | /* for scheme */ | |
| 419 | + | .syntax-special { | |
| 420 | + | color: var(--keyword2); | |
| 421 | + | font-weight: bold; | |
| 422 | + | } | |
| 423 | + | ||
| 424 | + | .syntax-keyword { | |
| 425 | + | color: var(--keyword); | |
| 426 | + | font-weight: bold; | |
| 427 | + | } | |
| 428 | + | ||
| 369 | 429 | @media screen and (max-width: 1250px) { | |
| 370 | 430 | #content { | |
| 371 | - | width: auto; | |
| 431 | + | width: 100%; | |
| 432 | + | padding: 0; | |
| 433 | + | } | |
| 434 | + | article.formatted-file-content { | |
| 435 | + | padding: 0.25em; | |
| 372 | 436 | } | |
| 373 | 437 | } | |