gitweb: Put project README in div.readme, fix its padding

Put (optional) projects README on "summary" page in <div> element
using "readme" class.  This allow to style it using CSS.

Add padding to project's README to make it line out with the rest
of the page.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
This commit is contained in:
Jakub Narebski 2007-11-19 14:16:12 +01:00 committed by Junio C Hamano
parent 591ebf6595
commit 9d06674570
2 changed files with 7 additions and 1 deletions

View file

@ -85,6 +85,10 @@ div.title, a.title {
color: #000000;
}
div.readme {
padding: 8px;
}
a.title:hover {
background-color: #d9d8d1;
}

View file

@ -3912,8 +3912,10 @@ sub git_summary {
if (-s "$projectroot/$project/README.html") {
if (open my $fd, "$projectroot/$project/README.html") {
print "<div class=\"title\">readme</div>\n";
print "<div class=\"title\">readme</div>\n" .
"<div class=\"readme\">\n";
print $_ while (<$fd>);
print "\n</div>\n"; # class="readme"
close $fd;
}
}