From 7cd44a7a26adf6693719afcf1c1e0b45bad50446 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 10 Sep 2005 17:47:13 +0000 Subject: [PATCH] Converting inline diff bits to be CSS classes --- diff.php | 6 +++--- templates/default/diff.tpl | 15 +++++++++++++++ templates/default/diff_line.tpl | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/diff.php b/diff.php index 5df40cd..0888cc2 100644 --- a/diff.php +++ b/diff.php @@ -68,15 +68,15 @@ foreach ($diff->fetch() AS $filename => $file) { if ($line['act'] == '+') { - $color = '#DDFFDD'; + $class = 'diff_add_bit'; } else if ($line['act'] == '-') { - $color = '#FFDDDD'; + $class = 'diff_del_bit'; } else { - $color = 'white'; + $class = 'diff_norm'; } $line['line_clean'] = $viewsvn->svn->format($line['line']); diff --git a/templates/default/diff.tpl b/templates/default/diff.tpl index b631ab4..a51276d 100644 --- a/templates/default/diff.tpl +++ b/templates/default/diff.tpl @@ -22,6 +22,21 @@ $navbar font: normal 11px monospace; } + .diff_add_bit + { + background-color: #DDFFDD; + } + + .diff_del_bit + { + background-color: #FFDDDD; + } + + .diff_norm + { + background-color: white; + } + //--> diff --git a/templates/default/diff_line.tpl b/templates/default/diff_line.tpl index 523d796..3aef0c8 100644 --- a/templates/default/diff_line.tpl +++ b/templates/default/diff_line.tpl @@ -8,6 +8,6 @@ $line[oldlineno] $line[newlineno] - $line[line_clean] + $line[line_clean] \ No newline at end of file -- 2.43.5