git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH 2/2] gitweb: Put project README in div.readme, fix its padding
Date: Mon, 19 Nov 2007 14:16:12 +0100	[thread overview]
Message-ID: <1195478172-17226-3-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <1195478172-17226-1-git-send-email-jnareb@gmail.com>

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  |    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

      parent reply	other threads:[~2007-11-19 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 13:16 [PATCH 0/2] gitweb: CSS cleanup, part 1 Jakub Narebski
2007-11-19 13:16 ` [PATCH 1/2] gitweb: Style all tables using CSS Jakub Narebski
2007-11-19 14:27   ` Bernt Hansen
2007-11-19 15:08     ` Jakub Narebski
2007-11-19 13:16 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195478172-17226-3-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).