Skip to content

Commit 591ebf6

Browse files
jnarebgitster
authored andcommitted
gitweb: Style all tables using CSS
Remove all cellspacing="0" attributes from tables in gitweb, replacing it by CSS rule. Add CSS classes for all tables. While at it, change class(es) of table for commit message and commit authorship search from "grep" to "commit_search"; similarly, "grep_search" class is now used for table with results of grep (files) search. Signed-off-by: Jakub Narebski <[email protected]>
1 parent 7ac1752 commit 591ebf6

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

gitweb/gitweb.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,10 @@ a.text:hover {
170170

171171
table {
172172
padding: 8px 4px;
173-
}
174-
175-
table.project_list {
176173
border-spacing: 0;
177174
}
178175

179176
table.diff_tree {
180-
border-spacing: 0;
181177
font-family: monospace;
182178
}
183179

gitweb/gitweb.perl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,7 @@ sub git_shortlog_body {
35443544
$from = 0 unless defined $from;
35453545
$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);
35463546

3547-
print "<table class=\"shortlog\" cellspacing=\"0\">\n";
3547+
print "<table class=\"shortlog\">\n";
35483548
my $alternate = 1;
35493549
for (my $i = $from; $i <= $to; $i++) {
35503550
my %co = %{$commitlist->[$i]};
@@ -3590,7 +3590,7 @@ sub git_history_body {
35903590
$from = 0 unless defined $from;
35913591
$to = $#{$commitlist} unless (defined $to && $to <= $#{$commitlist});
35923592

3593-
print "<table class=\"history\" cellspacing=\"0\">\n";
3593+
print "<table class=\"history\">\n";
35943594
my $alternate = 1;
35953595
for (my $i = $from; $i <= $to; $i++) {
35963596
my %co = %{$commitlist->[$i]};
@@ -3650,7 +3650,7 @@ sub git_tags_body {
36503650
$from = 0 unless defined $from;
36513651
$to = $#{$taglist} if (!defined $to || $#{$taglist} < $to);
36523652

3653-
print "<table class=\"tags\" cellspacing=\"0\">\n";
3653+
print "<table class=\"tags\">\n";
36543654
my $alternate = 1;
36553655
for (my $i = $from; $i <= $to; $i++) {
36563656
my $entry = $taglist->[$i];
@@ -3713,7 +3713,7 @@ sub git_heads_body {
37133713
$from = 0 unless defined $from;
37143714
$to = $#{$headlist} if (!defined $to || $#{$headlist} < $to);
37153715

3716-
print "<table class=\"heads\" cellspacing=\"0\">\n";
3716+
print "<table class=\"heads\">\n";
37173717
my $alternate = 1;
37183718
for (my $i = $from; $i <= $to; $i++) {
37193719
my $entry = $headlist->[$i];
@@ -3750,7 +3750,7 @@ sub git_search_grep_body {
37503750
$from = 0 unless defined $from;
37513751
$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);
37523752

3753-
print "<table class=\"grep\" cellspacing=\"0\">\n";
3753+
print "<table class=\"commit_search\">\n";
37543754
my $alternate = 1;
37553755
for (my $i = $from; $i <= $to; $i++) {
37563756
my %co = %{$commitlist->[$i]};
@@ -3891,7 +3891,7 @@ sub git_summary {
38913891
git_print_page_nav('summary','', $head);
38923892

38933893
print "<div class=\"title\">&nbsp;</div>\n";
3894-
print "<table cellspacing=\"0\">\n" .
3894+
print "<table class=\"projects_list\">\n" .
38953895
"<tr><td>description</td><td>" . esc_html($descr) . "</td></tr>\n" .
38963896
"<tr><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
38973897
if (defined $cd{'rfc2822'}) {
@@ -3965,7 +3965,7 @@ sub git_tag {
39653965

39663966
git_print_header_div('commit', esc_html($tag{'name'}), $hash);
39673967
print "<div class=\"title_text\">\n" .
3968-
"<table cellspacing=\"0\">\n" .
3968+
"<table class=\"object_header\">\n" .
39693969
"<tr>\n" .
39703970
"<td>object</td>\n" .
39713971
"<td>" . $cgi->a({-class => "list", -href => href(action=>$tag{'type'}, hash=>$tag{'object'})},
@@ -4405,7 +4405,7 @@ sub git_tree {
44054405
}
44064406
git_print_page_path($file_name, 'tree', $hash_base);
44074407
print "<div class=\"page_body\">\n";
4408-
print "<table cellspacing=\"0\">\n";
4408+
print "<table class=\"tree\">\n";
44094409
my $alternate = 1;
44104410
# '..' (top directory) link if possible
44114411
if (defined $hash_base &&
@@ -4627,7 +4627,7 @@ sub git_commit {
46274627
git_print_header_div('tree', esc_html($co{'title'}) . $ref, $co{'tree'}, $hash);
46284628
}
46294629
print "<div class=\"title_text\">\n" .
4630-
"<table cellspacing=\"0\">\n";
4630+
"<table class=\"object_header\">\n";
46314631
print "<tr><td>author</td><td>" . esc_html($co{'author'}) . "</td></tr>\n".
46324632
"<tr>" .
46334633
"<td></td><td> $ad{'rfc2822'}";
@@ -5226,7 +5226,7 @@ sub git_search {
52265226
git_print_page_nav('','', $hash,$co{'tree'},$hash);
52275227
git_print_header_div('commit', esc_html($co{'title'}), $hash);
52285228

5229-
print "<table cellspacing=\"0\">\n";
5229+
print "<table class=\"pickaxe search\">\n";
52305230
my $alternate = 1;
52315231
$/ = "\n";
52325232
my $git_command = git_cmd_str();
@@ -5293,7 +5293,7 @@ sub git_search {
52935293
git_print_page_nav('','', $hash,$co{'tree'},$hash);
52945294
git_print_header_div('commit', esc_html($co{'title'}), $hash);
52955295

5296-
print "<table cellspacing=\"0\">\n";
5296+
print "<table class=\"grep_search\">\n";
52975297
my $alternate = 1;
52985298
my $matches = 0;
52995299
$/ = "\n";

0 commit comments

Comments
 (0)