Skip to content

Commit

Permalink
gitweb: Put project README in div.readme, fix its padding
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Nov 20, 2007
1 parent 591ebf6 commit 9d06674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gitweb/gitweb.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ div.title, a.title {
color: #000000;
}

div.readme {
padding: 8px;
}

a.title:hover {
background-color: #d9d8d1;
}
Expand Down
4 changes: 3 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9d06674

Please sign in to comment.