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 <jnareb@gmail.com>
Jakub Narebski committed
Nov 19, 2007 at 14:16 UTC
591ebf6595ac7d5e5a21abbfc7501df19a67dc89
2 files changed
+11
-15
gitweb/gitweb.css
-4
@@ -170,14 +170,10 @@ a.text:hover {
170
171
table {
172
padding: 8px 4px;
173
-}
174
-
175
-table.project_list {
173
border-spacing: 0;
174
}
175
176
table.diff_tree {
180
- border-spacing: 0;
177
font-family: monospace;
178
}
179
gitweb/gitweb.perl
+11
-11
@@ -3544,7 +3544,7 @@ sub git_shortlog_body {
3544
$from = 0 unless defined $from;
3545
$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);
3546
3547
- print "<table class=\"shortlog\" cellspacing=\"0\">\n";
3547
+ print "<table class=\"shortlog\">\n";
3548
my $alternate = 1;
3549
for (my $i = $from; $i <= $to; $i++) {
3550
my %co = %{$commitlist->[$i]};
@@ -3590,7 +3590,7 @@ sub git_history_body {
3590
$from = 0 unless defined $from;
3591
$to = $#{$commitlist} unless (defined $to && $to <= $#{$commitlist});
3592
3593
- print "<table class=\"history\" cellspacing=\"0\">\n";
3593
+ print "<table class=\"history\">\n";
3594
my $alternate = 1;
3595
for (my $i = $from; $i <= $to; $i++) {
3596
my %co = %{$commitlist->[$i]};
@@ -3650,7 +3650,7 @@ sub git_tags_body {
3650
$from = 0 unless defined $from;
3651
$to = $#{$taglist} if (!defined $to || $#{$taglist} < $to);
3652
3653
- print "<table class=\"tags\" cellspacing=\"0\">\n";
3653
+ print "<table class=\"tags\">\n";
3654
my $alternate = 1;
3655
for (my $i = $from; $i <= $to; $i++) {
3656
my $entry = $taglist->[$i];
@@ -3713,7 +3713,7 @@ sub git_heads_body {
3713
$from = 0 unless defined $from;
3714
$to = $#{$headlist} if (!defined $to || $#{$headlist} < $to);
3715
3716
- print "<table class=\"heads\" cellspacing=\"0\">\n";
3716
+ print "<table class=\"heads\">\n";
3717
my $alternate = 1;
3718
for (my $i = $from; $i <= $to; $i++) {
3719
my $entry = $headlist->[$i];
@@ -3750,7 +3750,7 @@ sub git_search_grep_body {
3750
$from = 0 unless defined $from;
3751
$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);
3752
3753
- print "<table class=\"grep\" cellspacing=\"0\">\n";
3753
+ print "<table class=\"commit_search\">\n";
3754
my $alternate = 1;
3755
for (my $i = $from; $i <= $to; $i++) {
3756
my %co = %{$commitlist->[$i]};
@@ -3891,7 +3891,7 @@ sub git_summary {
3891
git_print_page_nav('summary','', $head);
3892
3893
print "<div class=\"title\"> </div>\n";
3894
- print "<table cellspacing=\"0\">\n" .
3894
+ print "<table class=\"projects_list\">\n" .
3895
"<tr><td>description</td><td>" . esc_html($descr) . "</td></tr>\n" .
3896
"<tr><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
3897
if (defined $cd{'rfc2822'}) {
@@ -3965,7 +3965,7 @@ sub git_tag {
3965
3966
git_print_header_div('commit', esc_html($tag{'name'}), $hash);
3967
print "<div class=\"title_text\">\n" .
3968
- "<table cellspacing=\"0\">\n" .
3968
+ "<table class=\"object_header\">\n" .
3969
"<tr>\n" .
3970
"<td>object</td>\n" .
3971
"<td>" . $cgi->a({-class => "list", -href => href(action=>$tag{'type'}, hash=>$tag{'object'})},
@@ -4405,7 +4405,7 @@ sub git_tree {
4405
}
4406
git_print_page_path($file_name, 'tree', $hash_base);
4407
print "<div class=\"page_body\">\n";
4408
- print "<table cellspacing=\"0\">\n";
4408
+ print "<table class=\"tree\">\n";
4409
my $alternate = 1;
4410
# '..' (top directory) link if possible
4411
if (defined $hash_base &&
@@ -4627,7 +4627,7 @@ sub git_commit {
4627
git_print_header_div('tree', esc_html($co{'title'}) . $ref, $co{'tree'}, $hash);
4628
}
4629
print "<div class=\"title_text\">\n" .
4630
- "<table cellspacing=\"0\">\n";
4630
+ "<table class=\"object_header\">\n";
4631
print "<tr><td>author</td><td>" . esc_html($co{'author'}) . "</td></tr>\n".
4632
"<tr>" .
4633
"<td></td><td> $ad{'rfc2822'}";
@@ -5226,7 +5226,7 @@ sub git_search {
5226
git_print_page_nav('','', $hash,$co{'tree'},$hash);
5227
git_print_header_div('commit', esc_html($co{'title'}), $hash);
5228
5229
- print "<table cellspacing=\"0\">\n";
5229
+ print "<table class=\"pickaxe search\">\n";
5230
my $alternate = 1;
5231
$/ = "\n";
5232
my $git_command = git_cmd_str();
@@ -5293,7 +5293,7 @@ sub git_search {
5293
git_print_page_nav('','', $hash,$co{'tree'},$hash);
5294
git_print_header_div('commit', esc_html($co{'title'}), $hash);
5295
5296
- print "<table cellspacing=\"0\">\n";
5296
+ print "<table class=\"grep_search\">\n";
5297
my $alternate = 1;
5298
my $matches = 0;
5299
$/ = "\n";