[PATCH 2/2] gitweb: Put project README in div.readme, fix its padding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 gitweb/gitweb.css  |    4 ++++
 gitweb/gitweb.perl |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 17c60e4..446a1c3 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 3d532dc..491a3f4 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;
 		}
 	}
-- 
1.5.3.5

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux