Code

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