<table>
<thead>
<tr>
- <th>sha1</th>
<th>author</th>
<th>date</th>
+ <th>sha1</th>
<th></th>
<th class='data'>data</th>
</tr>
<tfoot>
<tr>
- <td>sha1</td>
<td>author</td>
<td>date</td>
+ <td>sha1</td>
<td></td>
<td class='data'>data</td>
</tr>
<tbody>
[% FOR info IN blame %]
<tr class=''>
- <td class='commit-info'><a title="[% info.commit.author %] on [% info.commit.author_dt %]" href='[% c.uri_for('commit', {h=info.commit.sha1}) %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = info.commit.sha1.substr(0,7) -%]</a></td>
- <td class='author'>[% info.commit.author %]</td>
- <td class='date'>[% info.commit.author_dt.ymd %]</td>
- <td class='lineno'><tt>[% info.meta.lineno %]</tt></td>
+ [%-
+ linecolour = info.commit.sha1.substr(0,6);
+ IF info.commit.sha1 != lastsha1;
+ styleinfo = " style='border-top: solid 3px #" _ linecolour _ ";'"; -%]
+ <td class='author'[% styleinfo %]>[% info.commit.author %]</td>
+ <td class='date'[% styleinfo %]>[% info.commit.author_dt.ymd %]</td>
+ <td class='commit-info chroma-hash'[% styleinfo %]><a title="[% info.commit.author %] on [% info.commit.author_dt %]" href='[% c.uri_for('commit', {h=info.commit.sha1}) %]'>[% linecolour %]</td>
+ [%- ELSE -%]
+ <td class='author'></td>
+ <td class='date'></td>
+ <td class='commit-info'></td>
+ [%- END -%]
+ <td class='lineno' style='border-right: solid 3px #[% linecolour %]; border-left: solid 3px #[% linecolour %];'><tt>[% info.meta.lineno %]</tt></td>
<td class='data'><pre>[% info.line | html %]</pre></td>
+ [% lastsha1 = info.commit.sha1 %]
</tr>
[% END %]
</tbody>
background-color: #fefeaa;
}
-span.chroma-hash {
+.chroma-hash {
font-family: monospace;
font-size: 1em;
font-style: normal;
/*#blame td { border: solid 1px black; }*/
#blame td.lineno {
width: 2%;
- background-color: #ddd;
+ background-color: #eee;
}
#blame td.date {
width: 7%;
width: 10%;
}
#blame td.commit-info {
- width: 5%;
+ width: 4%;
}
#blame .data {
padding-left: 5px;