gitweb: Put project README in div.readme, fix its padding
authorJakub Narebski <jnareb@gmail.com>
Mon, 19 Nov 2007 13:16:12 +0000 (14:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Nov 2007 21:16:15 +0000 (13:16 -0800)
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>
gitweb/gitweb.css
gitweb/gitweb.perl

index 17c60e4..446a1c3 100644 (file)
@@ -85,6 +85,10 @@ div.title, a.title {
        color: #000000;
 }
 
+div.readme {
+       padding: 8px;
+}
+
 a.title:hover {
        background-color: #d9d8d1;
 }
index 3d532dc..491a3f4 100755 (executable)
@@ -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;
                }
        }