# # Patch for CVSweb to use colors for indicating age of changes. # --- cvsweb-3.0.6-orig/cvsweb.cgi +++ cvsweb-3.0.6/cvsweb.cgi @@ -1028,8 +1028,13 @@ EOF # Show last change in dir if ($filename) { - print "\n \n"; - print readableTime(time() - $date, 0) if $date; + my $ageclass = 'age'; + my $age = ''; + if ($date) { + $age = readableTime(time() - $date, 0); + $ageclass .= " $1" if ($age =~ /^\d+ ([a-z]+)/); + } + print "\n \n$age"; print "\n", htmlquote($author) if $show_author; print "\n"; @@ -1084,8 +1089,13 @@ EOF print ' ', &link(htmlquote($file), $url), $attic; print '', graph_link($fileurl) if $allow_cvsgraph; print "\n", display_link($fileurl, $rev); - print "\n"; - print readableTime(time() - $date, 0) if $date; + my $ageclass = 'age'; + my $age = ''; + if ($date) { + $age = readableTime(time() - $date, 0); + $ageclass .= " $1" if ($age =~ /^\d+ ([a-z]+)/); + } + print "\n$age"; print "\n", htmlquote($author) if $show_author; print "\n"; --- cvsweb-3.0.6-orig/css/cvsweb.css +++ cvsweb-3.0.6/css/cvsweb.css @@ -92,6 +92,20 @@ table.dir * td.age { font-style: italic; white-space: nowrap; } +table.dir * td.years { + color: #000; +} +table.dir * td.months { + color: #0a0; +} +table.dir * td.weeks { + color: #aa0; +} +table.dir * td.days, table.dir * td.hours, +table.dir * td.minutes, table.dir * td.seconds { + color: #f00; +} +/* Author column */ table.dir * td.author { white-space: nowrap; }