From: Jonathan Nieder Date: Sat, 4 Sep 2010 00:45:09 +0000 (-0500) Subject: gitweb: make logo optional X-Git-Tag: v1.7.4-rc2~1^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6822052427353525fe7158398bc6cf4bbd5d1351;p=git.git gitweb: make logo optional Some sites may not want to have a logo at all. While at it, use $cgi->img to simplify this code. (CGI.pm learned most HTML4 tags by version 2.79, so this should be portable to perl 5.8, though I haven't tested.) Signed-off-by: Jonathan Nieder Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 59b2e08b9..10cf97e66 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3501,10 +3501,15 @@ EOF insert_file($site_header); } - print "
\n" . - $cgi->a({-href => esc_url($logo_url), - -title => $logo_label}, - qq()); + print "
\n"; + if (defined $logo) { + print $cgi->a({-href => esc_url($logo_url), + -title => $logo_label}, + $cgi->img({-src => esc_url($logo), + -width => 72, -height => 27, + -alt => "git", + -class => "logo"})); + } print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / "; if (defined $project) { print $cgi->a({-href => href(action=>"summary")}, esc_html($project));