gitweb: Put project README in div.readme, fix its padding
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>
Jakub Narebski committed
Nov 19, 2007 at 14:16 UTC
9d066745708b77ef917565d699d5d193bfb00fbd
2 files changed
+7
-1
gitweb/gitweb.css
+4
@@ -85,6 +85,10 @@ div.title, a.title {
85
color: #000000;
86
}
87
88
+div.readme {
89
+ padding: 8px;
90
+}
91
+
92
a.title:hover {
93
background-color: #d9d8d1;
94
}
gitweb/gitweb.perl
+3
-1
@@ -3912,8 +3912,10 @@ sub git_summary {
3912
3913
if (-s "$projectroot/$project/README.html") {
3914
if (open my $fd, "$projectroot/$project/README.html") {
3915
- print "<div class=\"title\">readme</div>\n";
3915
+ print "<div class=\"title\">readme</div>\n" .
3916
+ "<div class=\"readme\">\n";
3917
print $_ while (<$fd>);
3918
+ print "\n</div>\n"; # class="readme"
3919
close $fd;
3920
}
3921
}