author | Lars Hjemli <hjemli@gmail.com> | 2007-05-13 20:25:14 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-13 20:31:11 (UTC) |
commit | 8a3685bcf2612206fc24a2421acb53dd83aeab85 (patch) (unidiff) | |
tree | 4628d87e55e87ead2e097cdacf8b4160cd0fc118 /cgit.css | |
parent | c6cf3a424a0860d69b290254d9b19d35527b2d27 (diff) | |
download | cgit-8a3685bcf2612206fc24a2421acb53dd83aeab85.zip cgit-8a3685bcf2612206fc24a2421acb53dd83aeab85.tar.gz cgit-8a3685bcf2612206fc24a2421acb53dd83aeab85.tar.bz2 |
Add graphical diffstat to commit view
The diffstat is calculated against the leftmost parent of the commit. This
gives nice information for "normal" merges while octopus merges are less
than optimal, so the diffstat isn't calculated for those merges.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -1,76 +1,83 @@ | |||
1 | body { | 1 | body { |
2 | font-family: arial; | 2 | font-family: arial; |
3 | font-size: 11pt; | 3 | font-size: 11pt; |
4 | background: white; | 4 | background: white; |
5 | } | 5 | } |
6 | 6 | ||
7 | body, table { | 7 | body, table { |
8 | padding: 0em; | 8 | padding: 0em; |
9 | margin: 0em; | 9 | margin: 0em; |
10 | } | 10 | } |
11 | 11 | ||
12 | table { | 12 | table { |
13 | border-collapse: collapse; | 13 | border-collapse: collapse; |
14 | } | 14 | } |
15 | 15 | ||
16 | h2 { | 16 | h2 { |
17 | font-size: 120%; | 17 | font-size: 120%; |
18 | font-weight: bold; | 18 | font-weight: bold; |
19 | margin-top: 0em; | 19 | margin-top: 0em; |
20 | margin-bottom: 0.25em; | 20 | margin-bottom: 0.25em; |
21 | } | 21 | } |
22 | 22 | ||
23 | h3 { | 23 | h3 { |
24 | margin-top: 0em; | 24 | margin-top: 0em; |
25 | font-size: 100%; | 25 | font-size: 100%; |
26 | font-weight: normal; | 26 | font-weight: normal; |
27 | } | 27 | } |
28 | 28 | ||
29 | h4 { | ||
30 | margin-top: 1.5em; | ||
31 | margin-bottom: 0.1em; | ||
32 | font-size: 100%; | ||
33 | font-weight: bold; | ||
34 | } | ||
35 | |||
29 | a { | 36 | a { |
30 | color: blue; | 37 | color: blue; |
31 | text-decoration: none; | 38 | text-decoration: none; |
32 | } | 39 | } |
33 | 40 | ||
34 | a:hover { | 41 | a:hover { |
35 | text-decoration: underline; | 42 | text-decoration: underline; |
36 | } | 43 | } |
37 | 44 | ||
38 | table.list { | 45 | table.list { |
39 | border: none; | 46 | border: none; |
40 | border-collapse: collapse; | 47 | border-collapse: collapse; |
41 | } | 48 | } |
42 | 49 | ||
43 | table.list tr { | 50 | table.list tr { |
44 | background: white; | 51 | background: white; |
45 | } | 52 | } |
46 | 53 | ||
47 | table.list tr:hover { | 54 | table.list tr:hover { |
48 | background: #eee; | 55 | background: #eee; |
49 | } | 56 | } |
50 | 57 | ||
51 | table.list tr.nohover:hover { | 58 | table.list tr.nohover:hover { |
52 | background: white; | 59 | background: white; |
53 | } | 60 | } |
54 | 61 | ||
55 | table.list th { | 62 | table.list th { |
56 | font-weight: normal; | 63 | font-weight: normal; |
57 | border-bottom: solid 1px #777; | 64 | border-bottom: solid 1px #777; |
58 | padding: 0.1em 0.5em 0.1em 0.5em; | 65 | padding: 0.1em 0.5em 0.1em 0.5em; |
59 | vertical-align: baseline; | 66 | vertical-align: baseline; |
60 | } | 67 | } |
61 | 68 | ||
62 | table.list td { | 69 | table.list td { |
63 | border: none; | 70 | border: none; |
64 | padding: 0.1em 0.5em 0.1em 0.5em; | 71 | padding: 0.1em 0.5em 0.1em 0.5em; |
65 | } | 72 | } |
66 | 73 | ||
67 | img { | 74 | img { |
68 | border: none; | 75 | border: none; |
69 | } | 76 | } |
70 | 77 | ||
71 | table#layout { | 78 | table#layout { |
72 | width: 100%; | 79 | width: 100%; |
73 | border-collapse: collapse; | 80 | border-collapse: collapse; |
74 | margin: 0px; | 81 | margin: 0px; |
75 | } | 82 | } |
76 | 83 | ||
@@ -182,115 +189,134 @@ td.filesize { | |||
182 | font-family: monospace; | 189 | font-family: monospace; |
183 | } | 190 | } |
184 | 191 | ||
185 | td.filemode { | 192 | td.filemode { |
186 | font-family: monospace; | 193 | font-family: monospace; |
187 | } | 194 | } |
188 | 195 | ||
189 | td.blob { | 196 | td.blob { |
190 | white-space: pre; | 197 | white-space: pre; |
191 | font-family: monospace; | 198 | font-family: monospace; |
192 | background-color: white; | 199 | background-color: white; |
193 | } | 200 | } |
194 | 201 | ||
195 | table.nowrap td { | 202 | table.nowrap td { |
196 | white-space: nowrap; | 203 | white-space: nowrap; |
197 | } | 204 | } |
198 | 205 | ||
199 | table.commit-info { | 206 | table.commit-info { |
200 | border-collapse: collapse; | 207 | border-collapse: collapse; |
201 | margin-top: 1.5em; | 208 | margin-top: 1.5em; |
202 | } | 209 | } |
203 | 210 | ||
204 | table.commit-info th { | 211 | table.commit-info th { |
205 | text-align: left; | 212 | text-align: left; |
206 | font-weight: normal; | 213 | font-weight: normal; |
207 | padding: 0.1em 1em 0.1em 0.1em; | 214 | padding: 0.1em 1em 0.1em 0.1em; |
208 | } | 215 | } |
209 | 216 | ||
210 | table.commit-info td { | 217 | table.commit-info td { |
211 | font-weight: normal; | 218 | font-weight: normal; |
212 | padding: 0.1em 1em 0.1em 0.1em; | 219 | padding: 0.1em 1em 0.1em 0.1em; |
213 | } | 220 | } |
214 | 221 | ||
215 | div.commit-subject { | 222 | div.commit-subject { |
216 | font-weight: bold; | 223 | font-weight: bold; |
217 | font-size: 125%; | 224 | font-size: 125%; |
218 | margin: 1.5em 0em 0.5em 0em; | 225 | margin: 1.5em 0em 0.5em 0em; |
219 | padding: 0em; | 226 | padding: 0em; |
220 | } | 227 | } |
221 | 228 | ||
222 | div.commit-msg { | 229 | div.commit-msg { |
223 | white-space: pre; | 230 | white-space: pre; |
224 | font-family: monospace; | 231 | font-family: monospace; |
225 | } | 232 | } |
226 | 233 | ||
227 | table.diffstat { | 234 | table.diffstat { |
228 | border-collapse: collapse; | 235 | border-collapse: collapse; |
229 | margin-top: 1.5em; | 236 | margin-top: 1.5em; |
237 | width: 100%; | ||
238 | border: solid 1px #aaa; | ||
239 | } | ||
240 | |||
241 | table.diffstat tr:hover { | ||
242 | background-color: #eee; | ||
230 | } | 243 | } |
231 | 244 | ||
232 | table.diffstat th { | 245 | table.diffstat th { |
233 | font-weight: normal; | 246 | font-weight: normal; |
234 | text-align: left; | 247 | text-align: left; |
235 | text-decoration: underline; | 248 | text-decoration: underline; |
236 | padding: 0.1em 1em 0.1em 0.1em; | 249 | padding: 0.1em 1em 0.1em 0.1em; |
237 | font-size: 100%; | 250 | font-size: 100%; |
238 | } | 251 | } |
239 | 252 | ||
240 | table.diffstat td { | 253 | table.diffstat td { |
241 | padding: 0.1em 1em 0.1em 0.1em; | 254 | padding: 0.2em 0.2em 0.1em 0.1em; |
242 | font-size: 100%; | 255 | font-size: 100%; |
256 | border: none; | ||
257 | border-top: solid 1px #aaa; | ||
258 | border-bottom: solid 1px #aaa; | ||
243 | } | 259 | } |
244 | 260 | ||
245 | table.diffstat td span.modechange { | 261 | table.diffstat td span.modechange { |
246 | padding-left: 1em; | 262 | padding-left: 1em; |
247 | color: red; | 263 | color: red; |
248 | } | 264 | } |
249 | 265 | ||
250 | table.diffstat td.add a { | 266 | table.diffstat td.add a { |
251 | color: green; | 267 | color: green; |
252 | } | 268 | } |
253 | 269 | ||
254 | table.diffstat td.del a { | 270 | table.diffstat td.del a { |
255 | color: red; | 271 | color: red; |
256 | } | 272 | } |
257 | 273 | ||
258 | table.diffstat td.upd a { | 274 | table.diffstat td.upd a { |
259 | color: blue; | 275 | color: blue; |
260 | } | 276 | } |
261 | 277 | ||
262 | table.diffstat td.summary { | 278 | table.diffstat td.graph { |
279 | width: 75%; | ||
280 | vertical-align: center; | ||
281 | } | ||
282 | |||
283 | table.diffstat td.graph img { | ||
284 | border: none; | ||
285 | height: 11pt; | ||
286 | } | ||
287 | |||
288 | div.diffstat-summary { | ||
263 | color: #888; | 289 | color: #888; |
264 | padding-top: 0.5em; | 290 | padding-top: 0.5em; |
265 | } | 291 | } |
266 | 292 | ||
267 | table.diff td { | 293 | table.diff td { |
268 | border: solid 1px black; | 294 | border: solid 1px black; |
269 | font-family: monospace; | 295 | font-family: monospace; |
270 | white-space: pre; | 296 | white-space: pre; |
271 | } | 297 | } |
272 | 298 | ||
273 | table.diff td div.hunk { | 299 | table.diff td div.hunk { |
274 | background: #ccc; | 300 | background: #ccc; |
275 | } | 301 | } |
276 | 302 | ||
277 | table.diff td div.add { | 303 | table.diff td div.add { |
278 | color: green; | 304 | color: green; |
279 | } | 305 | } |
280 | 306 | ||
281 | table.diff td div.del { | 307 | table.diff td div.del { |
282 | color: red; | 308 | color: red; |
283 | } | 309 | } |
284 | 310 | ||
285 | .sha1 { | 311 | .sha1 { |
286 | font-family: courier; | 312 | font-family: courier; |
287 | font-size: 90%; | 313 | font-size: 90%; |
288 | } | 314 | } |
289 | 315 | ||
290 | .left { | 316 | .left { |
291 | text-align: left; | 317 | text-align: left; |
292 | } | 318 | } |
293 | 319 | ||
294 | .right { | 320 | .right { |
295 | text-align: right; | 321 | text-align: right; |
296 | } | 322 | } |