# HG changeset patch # User Steve Losh # Date 1276410691 14400 # Node ID 444f6ef08d882a8d5142d74e4a1dfc78098bf391 # Parent 7521b06e6b18ab900790c2b73037ae4f6137399c web: you guessed it diff -r 7521b06e6b18 -r 444f6ef08d88 review/static/style.css --- a/review/static/style.css Sun Jun 13 02:11:28 2010 -0400 +++ b/review/static/style.css Sun Jun 13 02:31:31 2010 -0400 @@ -450,20 +450,31 @@ border: 1px solid #ddd; background-color: #f9f9f9; } -#changeset .content .diff table tr.viewing { - background-color: #f2f2d7; -} #changeset .content .diff table td.code:after { color: #ccc; content: "↩"; vertical-align: -1px; line-height: 1; } +#changeset .content .diff table tr.rem { + color: #800; +} +#changeset .content .diff table tr.add { + color: #040; +} +#changeset .content .diff table tr.viewing { + background-color: #f2f2d7; +} #changeset .content .diff table td { border: none; line-height: 1; padding: 3px 5px; } +#changeset .content .diff table td.addrem-add, #changeset .content .diff table td.addrem-rem { + font-weight: bold; + text-align: center; + width: 10px; +} #changeset .content .diff table td.linenumber { width: 25px; text-align: right; @@ -479,7 +490,7 @@ } #changeset .content .diff table td.comment { line-height: 15px; - padding: 10px 10px 10px 36px; + padding: 10px 10px 10px 56px; border-bottom: 1px solid #eee; border-top: 1px solid #eee; background-color: #f4f4f4; diff -r 7521b06e6b18 -r 444f6ef08d88 review/static/style.less --- a/review/static/style.less Sun Jun 13 02:11:28 2010 -0400 +++ b/review/static/style.less Sun Jun 13 02:31:31 2010 -0400 @@ -402,20 +402,34 @@ border: 1px solid #ddd; background-color: #f9f9f9; - tr.viewing { - background-color: lighten(@c-cream, 5%); - } td.code:after { color: #ccc; content: "↩"; vertical-align: -1px; line-height: 1; } + tr { + &.rem { + color: #800; + } + &.add { + color: #040; + } + &.viewing { + background-color: lighten(@c-cream, 5%); + } + } + td { border: none; line-height: 1; padding: 3px 5px; + &.addrem-add, &.addrem-rem { + font-weight: bold; + text-align: center; + width: 10px; + } &.linenumber { width: 25px; text-align: right; @@ -431,7 +445,7 @@ } &.comment { line-height: 15px; - padding: 10px 10px 10px 36px; + padding: 10px 10px 10px 56px; border-bottom: 1px solid #eee; border-top: 1px solid #eee; background-color: #f4f4f4; diff -r 7521b06e6b18 -r 444f6ef08d88 review/templates/diff.html --- a/review/templates/diff.html Sun Jun 13 02:11:28 2010 -0400 +++ b/review/templates/diff.html Sun Jun 13 02:31:31 2010 -0400 @@ -10,7 +10,7 @@ {% for line in annotated_diff %} {% if line['skipped'] %} - + … skipped {{ line['skipped'] }} lines … @@ -30,17 +30,22 @@ {% endfor %} {% else %} - - {{ line['number'] }} - {{ line['content'][1:]|escape }} - + {% with %} + {% set line_type = utils['line_type'](line['content']) %} + + + {{ line['number'] }} + {% if line_type == 'add' %}+{% elif line_type == 'rem' %}-{% endif %} + {{ line['content'][1:]|escape }} + + {% endwith %} {% with %} {% set comments = line['comments'] %} {% for comment in comments %} - + {{ ','.join(utils['map'](utils['str'], comment.lines)) }} {{ macros.gravatar(comment, utils) }}