{"thread":{"id":"10930","subject":"[PATCH 0/2] gitweb: CSS cleanup, part 1","startedAt":"2007-11-19T13:16:10Z","lastAt":"2007-11-19T15:08:45Z","messageCount":5,"participants":["Jakub Narebski","Bernt Hansen"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"60300","messageId":"1195478172-17226-1-git-send-email-jnareb@gmail.com","threadId":"10930","inReplyTo":null,"subject":"[PATCH 0/2] gitweb: CSS cleanup, part 1","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-19T13:16:10Z","receivedAt":"2007-11-19T13:16:10Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"This series of (independent) patches is low hanging fruit of gitweb's\nCSS cleanup and fixes. In the second part I plan on large\nreorganization of CSS file to make it easier to read, understand,\nand modify.\n\nJakub Narebski (2):\n      gitweb: Style all tables using CSS\n      gitweb: Put project README in div.readme, fix its padding\n\nDiffstat:\n gitweb/gitweb.css  |    8 ++++----\n gitweb/gitweb.perl |   26 ++++++++++++++------------\n 2 files changed, 18 insertions(+), 16 deletions(-)\n\n-- \nJakub Narebski\n"},{"id":"60301","messageId":"1195478172-17226-2-git-send-email-jnareb@gmail.com","threadId":"10930","inReplyTo":"1195478172-17226-1-git-send-email-jnareb@gmail.com","subject":"[PATCH 1/2] gitweb: Style all tables using CSS","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-19T13:16:11Z","receivedAt":"2007-11-19T13:16:11Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Remove all cellspacing=\"0\" attributes from tables in gitweb,\nreplacing it by CSS rule.  Add CSS classes for all tables.\n\nWhile at it, change class(es) of table for commit message and commit\nauthorship search from \"grep\" to \"commit_search\"; similarly,\n\"grep_search\" class is now used for table with results of grep (files)\nsearch.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nAll tables now get equivalent of 'cellspacing=\"0\"' attribute.\n\n gitweb/gitweb.css  |    4 ----\n gitweb/gitweb.perl |   22 +++++++++++-----------\n 2 files changed, 11 insertions(+), 15 deletions(-)\n\ndiff --git a/gitweb/gitweb.css b/gitweb/gitweb.css\nindex 1b88879..17c60e4 100644\n--- a/gitweb/gitweb.css\n+++ b/gitweb/gitweb.css\n@@ -170,14 +170,10 @@ a.text:hover {\n \n table {\n \tpadding: 8px 4px;\n-}\n-\n-table.project_list {\n \tborder-spacing: 0;\n }\n \n table.diff_tree {\n-\tborder-spacing: 0;\n \tfont-family: monospace;\n }\n \ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex e788ef9..3d532dc 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -3544,7 +3544,7 @@ sub git_shortlog_body {\n \t$from = 0 unless defined $from;\n \t$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);\n \n-\tprint \"<table class=\\\"shortlog\\\" cellspacing=\\\"0\\\">\\n\";\n+\tprint \"<table class=\\\"shortlog\\\">\\n\";\n \tmy $alternate = 1;\n \tfor (my $i = $from; $i <= $to; $i++) {\n \t\tmy %co = %{$commitlist->[$i]};\n@@ -3590,7 +3590,7 @@ sub git_history_body {\n \t$from = 0 unless defined $from;\n \t$to = $#{$commitlist} unless (defined $to && $to <= $#{$commitlist});\n \n-\tprint \"<table class=\\\"history\\\" cellspacing=\\\"0\\\">\\n\";\n+\tprint \"<table class=\\\"history\\\">\\n\";\n \tmy $alternate = 1;\n \tfor (my $i = $from; $i <= $to; $i++) {\n \t\tmy %co = %{$commitlist->[$i]};\n@@ -3650,7 +3650,7 @@ sub git_tags_body {\n \t$from = 0 unless defined $from;\n \t$to = $#{$taglist} if (!defined $to || $#{$taglist} < $to);\n \n-\tprint \"<table class=\\\"tags\\\" cellspacing=\\\"0\\\">\\n\";\n+\tprint \"<table class=\\\"tags\\\">\\n\";\n \tmy $alternate = 1;\n \tfor (my $i = $from; $i <= $to; $i++) {\n \t\tmy $entry = $taglist->[$i];\n@@ -3713,7 +3713,7 @@ sub git_heads_body {\n \t$from = 0 unless defined $from;\n \t$to = $#{$headlist} if (!defined $to || $#{$headlist} < $to);\n \n-\tprint \"<table class=\\\"heads\\\" cellspacing=\\\"0\\\">\\n\";\n+\tprint \"<table class=\\\"heads\\\">\\n\";\n \tmy $alternate = 1;\n \tfor (my $i = $from; $i <= $to; $i++) {\n \t\tmy $entry = $headlist->[$i];\n@@ -3750,7 +3750,7 @@ sub git_search_grep_body {\n \t$from = 0 unless defined $from;\n \t$to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);\n \n-\tprint \"<table class=\\\"grep\\\" cellspacing=\\\"0\\\">\\n\";\n+\tprint \"<table class=\\\"commit_search\\\">\\n\";\n \tmy $alternate = 1;\n \tfor (my $i = $from; $i <= $to; $i++) {\n \t\tmy %co = %{$commitlist->[$i]};\n@@ -3891,7 +3891,7 @@ sub git_summary {\n \tgit_print_page_nav('summary','', $head);\n \n \tprint \"<div class=\\\"title\\\">&nbsp;</div>\\n\";\n-\tprint \"<table cellspacing=\\\"0\\\">\\n\" .\n+\tprint \"<table class=\\\"projects_list\\\">\\n\" .\n \t      \"<tr><td>description</td><td>\" . esc_html($descr) . \"</td></tr>\\n\" .\n \t      \"<tr><td>owner</td><td>\" . esc_html($owner) . \"</td></tr>\\n\";\n \tif (defined $cd{'rfc2822'}) {\n@@ -3965,7 +3965,7 @@ sub git_tag {\n \n \tgit_print_header_div('commit', esc_html($tag{'name'}), $hash);\n \tprint \"<div class=\\\"title_text\\\">\\n\" .\n-\t      \"<table cellspacing=\\\"0\\\">\\n\" .\n+\t      \"<table class=\\\"object_header\\\">\\n\" .\n \t      \"<tr>\\n\" .\n \t      \"<td>object</td>\\n\" .\n \t      \"<td>\" . $cgi->a({-class => \"list\", -href => href(action=>$tag{'type'}, hash=>$tag{'object'})},\n@@ -4405,7 +4405,7 @@ sub git_tree {\n \t}\n \tgit_print_page_path($file_name, 'tree', $hash_base);\n \tprint \"<div class=\\\"page_body\\\">\\n\";\n-\tprint \"<table cellspacing=\\\"0\\\">\\n\";\n+\tprint \"<table class=\\\"tree\\\">\\n\";\n \tmy $alternate = 1;\n \t# '..' (top directory) link if possible\n \tif (defined $hash_base &&\n@@ -4627,7 +4627,7 @@ sub git_commit {\n \t\tgit_print_header_div('tree', esc_html($co{'title'}) . $ref, $co{'tree'}, $hash);\n \t}\n \tprint \"<div class=\\\"title_text\\\">\\n\" .\n-\t      \"<table cellspacing=\\\"0\\\">\\n\";\n+\t      \"<table class=\\\"object_header\\\">\\n\";\n \tprint \"<tr><td>author</td><td>\" . esc_html($co{'author'}) . \"</td></tr>\\n\".\n \t      \"<tr>\" .\n \t      \"<td></td><td> $ad{'rfc2822'}\";\n@@ -5226,7 +5226,7 @@ sub git_search {\n \t\tgit_print_page_nav('','', $hash,$co{'tree'},$hash);\n \t\tgit_print_header_div('commit', esc_html($co{'title'}), $hash);\n \n-\t\tprint \"<table cellspacing=\\\"0\\\">\\n\";\n+\t\tprint \"<table class=\\\"pickaxe search\\\">\\n\";\n \t\tmy $alternate = 1;\n \t\t$/ = \"\\n\";\n \t\tmy $git_command = git_cmd_str();\n@@ -5293,7 +5293,7 @@ sub git_search {\n \t\tgit_print_page_nav('','', $hash,$co{'tree'},$hash);\n \t\tgit_print_header_div('commit', esc_html($co{'title'}), $hash);\n \n-\t\tprint \"<table cellspacing=\\\"0\\\">\\n\";\n+\t\tprint \"<table class=\\\"grep_search\\\">\\n\";\n \t\tmy $alternate = 1;\n \t\tmy $matches = 0;\n \t\t$/ = \"\\n\";\n-- \n1.5.3.5\n"},{"id":"60302","messageId":"1195478172-17226-3-git-send-email-jnareb@gmail.com","threadId":"10930","inReplyTo":"1195478172-17226-1-git-send-email-jnareb@gmail.com","subject":"[PATCH 2/2] gitweb: Put project README in div.readme, fix its padding","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-19T13:16:12Z","receivedAt":"2007-11-19T13:16:12Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Put (optional) projects README on \"summary\" page in <div> element\nusing \"readme\" class.  This allow to style it using CSS.\n\nAdd padding to project's README to make it line out with the rest\nof the page.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.css  |    4 ++++\n gitweb/gitweb.perl |    4 +++-\n 2 files changed, 7 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.css b/gitweb/gitweb.css\nindex 17c60e4..446a1c3 100644\n--- a/gitweb/gitweb.css\n+++ b/gitweb/gitweb.css\n@@ -85,6 +85,10 @@ div.title, a.title {\n \tcolor: #000000;\n }\n \n+div.readme {\n+\tpadding: 8px;\n+}\n+\n a.title:hover {\n \tbackground-color: #d9d8d1;\n }\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 3d532dc..491a3f4 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -3912,8 +3912,10 @@ sub git_summary {\n \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=\\\"title\\\">readme</div>\\n\" .\n+\t\t\t      \"<div class=\\\"readme\\\">\\n\";\n \t\t\tprint $_ while (<$fd>);\n+\t\t\tprint \"\\n</div>\\n\"; # class=\"readme\"\n \t\t\tclose $fd;\n \t\t}\n \t}\n-- \n1.5.3.5\n"},{"id":"60318","messageId":"87d4u671kx.fsf@gollum.intra.norang.ca","threadId":"10930","inReplyTo":"1195478172-17226-2-git-send-email-jnareb@gmail.com","subject":"Re: [PATCH 1/2] gitweb: Style all tables using CSS","fromName":"Bernt Hansen","fromEmail":"bernt@alumni.uwaterloo.ca","sentAt":"2007-11-19T14:27:10Z","receivedAt":"2007-11-19T14:27:10Z","isPatch":true,"sender":{"key":"bernt@norang.ca","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> -\tprint \"<table cellspacing=\\\"0\\\">\\n\" .\n> +\tprint \"<table class=\\\"projects_list\\\">\\n\" .\n\nShould this class be \"project_list\" instead?  I don't see a definition\nof \"projects_list\" (plural) anywhere.\n\nBernt\n"},{"id":"60316","messageId":"200711191608.46955.jnareb@gmail.com","threadId":"10930","inReplyTo":"87d4u671kx.fsf@gollum.intra.norang.ca","subject":"Re: [PATCH 1/2] gitweb: Style all tables using CSS","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-19T15:08:45Z","receivedAt":"2007-11-19T15:08:45Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Bernt Hansen wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > -\tprint \"<table cellspacing=\\\"0\\\">\\n\" .\n> > +\tprint \"<table class=\\\"projects_list\\\">\\n\" .\n> \n> Should this class be \"project_list\" instead?  I don't see a definition\n> of \"projects_list\" (plural) anywhere.\n\nNow that you mentioned it, I have checked and... we have a bit of \ninconsistency in gitweb here. There are $projects_list and \n$projects_list_description_width variables (plural), \ngit_get_projects_list subroutine (also plural), but view is called \n'project_list', it is generated by git_project_list subroutine using \ngit_get_project_list_from_file and git_project_lis_body subroutines.\n\nI am not native English speaker: gitweb mean here \"list of projects\".\nWe should probably uniqueify number to either plural or singular, and \nnot mixed as it is now. But this is a bit of nitpicking/paintshed...\n\nChanging action name from 'project_list' would be hard because of \nbackward compatibility... _if_ we officially used this action; it is \ndefault action when no project is selected, and all links use this \nform.\n\n-- \nJakub Narebski\nPoland\n"}]}