{"thread":{"id":"7439","subject":"[PATCH] gitweb: Add padding to project's README on \"summary\" page","startedAt":"2007-03-27T23:20:27Z","lastAt":"2007-03-27T23:20:27Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"38197","messageId":"11750376272105-git-send-email-jnareb@gmail.com","threadId":"7439","inReplyTo":null,"subject":"[PATCH] gitweb: Add padding to project's README on \"summary\" page","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-27T23:20:27Z","receivedAt":"2007-03-27T23:20:27Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Add padding to (optional) project's README on \"summary\" page (taken\nfrom README.html in project's GIT_DIR), to make it line out with the\nrest of the page.\n\nIt is done by adding a wrapper div element around README contents,\nwith \"readme\" class, and CSS rule for div.readme; it fixes layout,\nbut probably should be refactored during gitweb CSS cleanup.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.css  |    4 ++++\n gitweb/gitweb.perl |    2 ++\n 2 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.css b/gitweb/gitweb.css\nindex 5e40292..cbe8c11 100644\n--- a/gitweb/gitweb.css\n+++ b/gitweb/gitweb.css\n@@ -76,6 +76,10 @@ div.page_body {\n \tfont-family: monospace;\n }\n \n+div.readme {\n+\tpadding: 8px;\n+}\n+\n div.title, a.title {\n \tdisplay: block;\n \tpadding: 6px 8px;\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 3786955..4f34c29 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -3063,7 +3063,9 @@ sub git_summary {\n \tif (-s \"$projectroot/$project/README.html\") {\n \t\tif (open my $fd, \"$projectroot/$project/README.html\") {\n \t\t\tprint \"<div class=\\\"title\\\">readme</div>\\n\";\n+\t\t\tprint \"<div class=\\\"readme\\\">\\n\";\n \t\t\tprint $_ while (<$fd>);\n+\t\t\tprint \"</div>\\n\"; # class=\"readme\"\n \t\t\tclose $fd;\n \t\t}\n \t}\n-- \n1.5.0.5\n"}]}