Use graded colors to more clearly indicate relative age.

This commit is contained in:
Dag-Erling Smørgrav 2003-11-12 08:30:51 +00:00
parent 7b93590403
commit f61d63d059
2 changed files with 24 additions and 20 deletions

View File

@ -121,8 +121,10 @@ MAIN:{
if (-f "$DIR/$log.brief") { if (-f "$DIR/$log.brief") {
my @stat = stat("$DIR/$log.brief"); my @stat = stat("$DIR/$log.brief");
my $class = success("$DIR/$log.brief") ? "ok" : "fail"; my $class = success("$DIR/$log.brief") ? "ok" : "fail";
$class .= "-stale" my $age = int($now - $stat[9] / 7200);
if ($now - $stat[9] > $STALE); $age = 9
if ($age > 9);
$class .= "-$age";
$links .= "<span class=\"$class\">" . $links .= "<span class=\"$class\">" .
strftime("%Y-%m-%d %H:%M&nbsp;UTC", gmtime($stat[9])) . strftime("%Y-%m-%d %H:%M&nbsp;UTC", gmtime($stat[9])) .
"</span><br />"; "</span><br />";

View File

@ -32,25 +32,27 @@ A:active {
font-style: italic; font-style: italic;
} }
.ok { .ok-0 { background-color: white; color: #007700; }
background-color: white; .ok-1 { background-color: white; color: #117B11; }
color: #070; .ok-2 { background-color: white; color: #227F22; }
} .ok-3 { background-color: white; color: #338333; }
.ok-4 { background-color: white; color: #448744; }
.ok-5 { background-color: white; color: #558B55; }
.ok-6 { background-color: white; color: #668F66; }
.ok-7 { background-color: white; color: #779377; }
.ok-8 { background-color: white; color: #889788; }
.ok-9 { background-color: white; color: #999B99; }
.ok-stale { .fail-0 { background-color: white; color: #ff0000; }
background-color: white; .fail-1 { background-color: white; color: #ff1111; }
color: #797; .fail-2 { background-color: white; color: #ff2222; }
} .fail-3 { background-color: white; color: #ff3333; }
.fail-4 { background-color: white; color: #ff4444; }
.fail { .fail-5 { background-color: white; color: #ff5555; }
background-color: white; .fail-6 { background-color: white; color: #ff6666; }
color: #f00; .fail-7 { background-color: white; color: #ff7777; }
} .fail-8 { background-color: white; color: #ff8888; }
.fail-9 { background-color: white; color: #ff9999; }
.fail-stale {
background-color: white;
color: #f99;
}
TD, TH { TD, TH {
width: 16ex; width: 16ex;