From: Jakub Narebski Date: Mon, 19 Nov 2007 13:16:12 +0000 (+0100) Subject: gitweb: Put project README in div.readme, fix its padding X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/a88587eca582550d99d3ab15acaa1a1ef5ead84deafc9c8c6304d28f52d8e561 gitweb: Put project README in div.readme, fix its padding Put (optional) projects README on "summary" page in
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 --- diff --git a/gitweb.css b/gitweb.css index 5e95433..b4050b7 100644 --- a/gitweb.css +++ b/gitweb.css @@ -85,6 +85,10 @@ div.title, a.title { color: #000000; } +div.readme { + padding: 8px; +} + a.title:hover { background-color: #d9d8d1; } diff --git a/gitweb.perl b/gitweb.perl index a87959e..566004a 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -3913,8 +3913,10 @@ sub git_summary { if (-s "$projectroot/$project/README.html") { if (open my $fd, "$projectroot/$project/README.html") { - print "
readme
\n"; + print "
readme
\n" . + "
\n"; print $_ while (<$fd>); + print "\n
\n"; # class="readme" close $fd; } }