Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2007-11-19 16:16:12 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-21 00:16:15 +0300
commit9d066745708b77ef917565d699d5d193bfb00fbd (patch)
treec2f7ceecc6072fb69f2ebfeb7edf27e8f9cc5f2c /gitweb
parent591ebf6595ac7d5e5a21abbfc7501df19a67dc89 (diff)
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>
Diffstat (limited to 'gitweb')
-rw-r--r--gitweb/gitweb.css4
-rwxr-xr-xgitweb/gitweb.perl4
2 files changed, 7 insertions, 1 deletions
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 17c60e4cb4..446a1c333b 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 3d532dc7d7..491a3f41d2 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 "<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;
}
}