Skip to content

Commit 9d06674

Browse files
jnarebgitster
authored andcommitted
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 <[email protected]>
1 parent 591ebf6 commit 9d06674

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

gitweb/gitweb.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ div.title, a.title {
8585
color: #000000;
8686
}
8787

88+
div.readme {
89+
padding: 8px;
90+
}
91+
8892
a.title:hover {
8993
background-color: #d9d8d1;
9094
}

gitweb/gitweb.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3912,8 +3912,10 @@ sub git_summary {
39123912

39133913
if (-s "$projectroot/$project/README.html") {
39143914
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";
39163917
print $_ while (<$fd>);
3918+
print "\n</div>\n"; # class="readme"
39173919
close $fd;
39183920
}
39193921
}

0 commit comments

Comments
 (0)