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-Tag: v1.5.4-rc0~174 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9d066745708b77ef917565d699d5d193bfb00fbd;p=git.git 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/gitweb.css b/gitweb/gitweb.css index 17c60e4cb..446a1c333 100644 --- a/gitweb/gitweb.css +++ b/gitweb/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/gitweb.perl b/gitweb/gitweb.perl index 3d532dc7d..491a3f41d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3912,8 +3912,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; } }