author | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 00:13:11 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 07:09:42 (UTC) |
commit | e903011c4457c24c0095f270ca5e78c40729434f (patch) (unidiff) | |
tree | 255f128dfaf81f2fd03bb2216039bbf8f38ef167 /cgit.css | |
parent | cfd2aa079770ddb4c93d5995b2cd7b5f25da3681 (diff) | |
download | cgit-e903011c4457c24c0095f270ca5e78c40729434f.zip cgit-e903011c4457c24c0095f270ca5e78c40729434f.tar.gz cgit-e903011c4457c24c0095f270ca5e78c40729434f.tar.bz2 |
Use tables and css to create the diffstat graph, fix scaling
There was no need to use image-files for the graphs, so lets drop them.
At the same time, fix scaling of the graphs so that the full width is
used only if atleast 100 LOC are changed in one of the files.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -191,140 +191,157 @@ td.filesize { | |||
191 | 191 | ||
192 | td.links { | 192 | td.links { |
193 | font-size: 80%; | 193 | font-size: 80%; |
194 | padding-left: 2em; | 194 | padding-left: 2em; |
195 | } | 195 | } |
196 | 196 | ||
197 | td.filemode { | 197 | td.filemode { |
198 | font-family: monospace; | 198 | font-family: monospace; |
199 | } | 199 | } |
200 | 200 | ||
201 | td.blob { | 201 | td.blob { |
202 | white-space: pre; | 202 | white-space: pre; |
203 | font-family: monospace; | 203 | font-family: monospace; |
204 | background-color: white; | 204 | background-color: white; |
205 | } | 205 | } |
206 | 206 | ||
207 | table.nowrap td { | 207 | table.nowrap td { |
208 | white-space: nowrap; | 208 | white-space: nowrap; |
209 | } | 209 | } |
210 | 210 | ||
211 | table.commit-info { | 211 | table.commit-info { |
212 | border-collapse: collapse; | 212 | border-collapse: collapse; |
213 | margin-top: 1.5em; | 213 | margin-top: 1.5em; |
214 | } | 214 | } |
215 | 215 | ||
216 | table.commit-info th { | 216 | table.commit-info th { |
217 | text-align: left; | 217 | text-align: left; |
218 | font-weight: normal; | 218 | font-weight: normal; |
219 | padding: 0.1em 1em 0.1em 0.1em; | 219 | padding: 0.1em 1em 0.1em 0.1em; |
220 | } | 220 | } |
221 | 221 | ||
222 | table.commit-info td { | 222 | table.commit-info td { |
223 | font-weight: normal; | 223 | font-weight: normal; |
224 | padding: 0.1em 1em 0.1em 0.1em; | 224 | padding: 0.1em 1em 0.1em 0.1em; |
225 | } | 225 | } |
226 | 226 | ||
227 | div.commit-subject { | 227 | div.commit-subject { |
228 | font-weight: bold; | 228 | font-weight: bold; |
229 | font-size: 125%; | 229 | font-size: 125%; |
230 | margin: 1.5em 0em 0.5em 0em; | 230 | margin: 1.5em 0em 0.5em 0em; |
231 | padding: 0em; | 231 | padding: 0em; |
232 | } | 232 | } |
233 | 233 | ||
234 | div.commit-msg { | 234 | div.commit-msg { |
235 | white-space: pre; | 235 | white-space: pre; |
236 | font-family: monospace; | 236 | font-family: monospace; |
237 | } | 237 | } |
238 | 238 | ||
239 | table.diffstat { | 239 | table.diffstat { |
240 | border-collapse: collapse; | 240 | border-collapse: collapse; |
241 | margin-top: 1.5em; | 241 | margin-top: 1.5em; |
242 | width: 100%; | 242 | width: 100%; |
243 | border: solid 1px #aaa; | 243 | border: solid 1px #aaa; |
244 | background-color: #eee; | 244 | background-color: #eee; |
245 | } | 245 | } |
246 | 246 | ||
247 | table.diffstat tr:hover { | 247 | table.diffstat tr:hover { |
248 | background-color: #ccc; | 248 | background-color: #ccc; |
249 | } | 249 | } |
250 | 250 | ||
251 | table.diffstat th { | 251 | table.diffstat th { |
252 | font-weight: normal; | 252 | font-weight: normal; |
253 | text-align: left; | 253 | text-align: left; |
254 | text-decoration: underline; | 254 | text-decoration: underline; |
255 | padding: 0.1em 1em 0.1em 0.1em; | 255 | padding: 0.1em 1em 0.1em 0.1em; |
256 | font-size: 100%; | 256 | font-size: 100%; |
257 | } | 257 | } |
258 | 258 | ||
259 | table.diffstat td { | 259 | table.diffstat td { |
260 | padding: 0.2em 0.2em 0.1em 0.1em; | 260 | padding: 0.2em 0.2em 0.1em 0.1em; |
261 | font-size: 100%; | 261 | font-size: 100%; |
262 | border: none; | 262 | border: none; |
263 | } | 263 | } |
264 | 264 | ||
265 | table.diffstat td span.modechange { | 265 | table.diffstat td span.modechange { |
266 | padding-left: 1em; | 266 | padding-left: 1em; |
267 | color: red; | 267 | color: red; |
268 | } | 268 | } |
269 | 269 | ||
270 | table.diffstat td.add a { | 270 | table.diffstat td.add a { |
271 | color: green; | 271 | color: green; |
272 | } | 272 | } |
273 | 273 | ||
274 | table.diffstat td.del a { | 274 | table.diffstat td.del a { |
275 | color: red; | 275 | color: red; |
276 | } | 276 | } |
277 | 277 | ||
278 | table.diffstat td.upd a { | 278 | table.diffstat td.upd a { |
279 | color: blue; | 279 | color: blue; |
280 | } | 280 | } |
281 | 281 | ||
282 | table.diffstat td.graph { | 282 | table.diffstat td.graph { |
283 | width: 75%; | 283 | width: 75%; |
284 | vertical-align: center; | 284 | vertical-align: center; |
285 | } | 285 | } |
286 | 286 | ||
287 | table.diffstat td.graph img { | 287 | table.diffstat td.graph table { |
288 | border: none; | 288 | border: none; |
289 | height: 8pt; | 289 | } |
290 | |||
291 | table.diffstat td.graph td { | ||
292 | padding: 0px; | ||
293 | border: 0px; | ||
294 | height: 7pt; | ||
295 | } | ||
296 | |||
297 | table.diffstat td.graph td.add { | ||
298 | background-color: #5c5; | ||
299 | } | ||
300 | |||
301 | table.diffstat td.graph td.rem { | ||
302 | background-color: #c55; | ||
303 | } | ||
304 | |||
305 | table.diffstat td.graph td.none { | ||
306 | background-color: none; | ||
290 | } | 307 | } |
291 | 308 | ||
292 | div.diffstat-summary { | 309 | div.diffstat-summary { |
293 | color: #888; | 310 | color: #888; |
294 | padding-top: 0.5em; | 311 | padding-top: 0.5em; |
295 | } | 312 | } |
296 | 313 | ||
297 | table.diff td { | 314 | table.diff td { |
298 | font-family: monospace; | 315 | font-family: monospace; |
299 | white-space: pre; | 316 | white-space: pre; |
300 | } | 317 | } |
301 | 318 | ||
302 | table.diff td div.head { | 319 | table.diff td div.head { |
303 | font-weight: bold; | 320 | font-weight: bold; |
304 | padding-top: 1em; | 321 | padding-top: 1em; |
305 | } | 322 | } |
306 | 323 | ||
307 | table.diff td div.hunk { | 324 | table.diff td div.hunk { |
308 | color: #009; | 325 | color: #009; |
309 | } | 326 | } |
310 | 327 | ||
311 | table.diff td div.add { | 328 | table.diff td div.add { |
312 | color: green; | 329 | color: green; |
313 | } | 330 | } |
314 | 331 | ||
315 | table.diff td div.del { | 332 | table.diff td div.del { |
316 | color: red; | 333 | color: red; |
317 | } | 334 | } |
318 | 335 | ||
319 | .sha1 { | 336 | .sha1 { |
320 | font-family: courier; | 337 | font-family: courier; |
321 | font-size: 90%; | 338 | font-size: 90%; |
322 | } | 339 | } |
323 | 340 | ||
324 | .left { | 341 | .left { |
325 | text-align: left; | 342 | text-align: left; |
326 | } | 343 | } |
327 | 344 | ||
328 | .right { | 345 | .right { |
329 | text-align: right; | 346 | text-align: right; |
330 | } | 347 | } |