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 <jrnieder@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Sep 3, 2010 at 19:45 UTC
6822052427353525fe7158398bc6cf4bbd5d1351
1 file changed
+9
-4
gitweb/gitweb.perl
+9
-4
@@ -3501,10 +3501,15 @@ EOF
3501
insert_file($site_header);
3502
}
3503
3504
- print "<div class=\"page_header\">\n" .
3505
- $cgi->a({-href => esc_url($logo_url),
3506
- -title => $logo_label},
3507
- qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
3504
+ print "<div class=\"page_header\">\n";
3505
+ if (defined $logo) {
3506
+ print $cgi->a({-href => esc_url($logo_url),
3507
+ -title => $logo_label},
3508
+ $cgi->img({-src => esc_url($logo),
3509
+ -width => 72, -height => 27,
3510
+ -alt => "git",
3511
+ -class => "logo"}));
3512
+ }
3513
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
3514
if (defined $project) {
3515
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));