Subject: Re: [PATCH v2 06/11] gitweb: use CSS to style split head lists.

From: Jakub Narebski <[email-masked]>
Date: Sat, 15 Nov 2008 01:20:50 +0100

On Thu, 13 Nov 2008, Giuseppe Bilotta wrote:

> Introduce a new div class 'subsection' in the CSS and use it to style
> split head lists.

I think this patch should be squashed with the previous one.
 
> Signed-off-by: Giuseppe Bilotta <[email-masked]>
> ---
>  gitweb/gitweb.css  |   10 ++++++++++
>  gitweb/gitweb.perl |    4 +++-
>  2 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
> index a01eac8..751749f 100644
> --- a/gitweb/gitweb.css
> +++ b/gitweb/gitweb.css
> @@ -8,6 +8,16 @@ body {
>  	color: #000000;
>  }
>  
> +div.subsection {
> +	border: solid #d9d8d1;
> +	border-width: 1px;
> +	margin: 10px;
> +}
> +
> +.subsection .title {
> +	font-size: smaller;
> +}

Hmmm... do we use "subsection title" class anywhere? If you did
introduce it in earlier patch, this is one more reason to squash
them (after significant reworking)... ahh, this is link or span
or div with class .title insider div.subsection, sorry.

> +
>  a {
>  	color: #0000cc;
>  }
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 836b6ba..03e0b21 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -4296,9 +4296,11 @@ sub git_split_heads_body {
>  	} @$headlist;
>  
>  	foreach $leader (sort(keys %headlists)) {
> -		print "<b>$leader</b><br/>\n" unless $leader eq "\000";
> +		print "<div class=\"subsection\">\n";
> +		git_print_header_div(undef, $leader) unless $leader eq "\000";

Again, cannot this ugly guardian value be replaced by for example empty
string '', or undef?

>  		$list = $headlists{$leader};
>  		git_heads_body($list, $head, $from, $to, $extra);
> +		print "</div>\n";

Just in case, for easier editing and easier browsing through *occur*
buffer, I'd use here

+		print "</div>\n"; # class="subsection"

>  	}
>  }

-- 
Jakub Narebski
Poland