These patches were last seen in the instaweb 1.7.1 maintenance thread[1] but I believe they are independently useful. The idea is to allow disabling the logo in gitweb. Jonathan Nieder (2): gitweb: skip logo in atom feed when there is none gitweb: make logo optional gitweb/gitweb.perl | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) [1] http://thread.gmane.org/gmane.comp.version-control.git/155224 --
Date: Fri, 3 Sep 2010 19:44:39 -0500
With v1.5.0-rc0~169 (gitweb: Fix Atom feed <logo>: it is $logo,
not $logo_url, 2006-12-04), the logo URI to be written to Atom
feeds was corrected but the case of no logo forgotten.
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
gitweb/gitweb.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4779618..c65af1a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -7169,7 +7169,7 @@ XML
if (defined $favicon) {
print "<icon>" . esc_url($favicon) . "</icon>\n";
}
- if (defined $logo_url) {
+ if (defined $logo) {
# not twice as wide as tall: 72 x 27 pixels
print "<logo>" . esc_url($logo) . "</logo>\n";
}
--
1.7.4.rc0
--
Date: Fri, 3 Sep 2010 19:45:09 -0500
Some sites may not want to have a logo at all. In particular, git
instaweb can benefit from this.
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>
---
Eric liked an earlier version of this patch that did not use
$cgi->img.
gitweb/gitweb.perl | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c65af1a..064697c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3601,10 +3601,15 @@ EOF
insert_file($site_header);
}
- print "<div class=\"page_header\">\n" .
- $cgi->a({-href => esc_url($logo_url),
- -title => $logo_label},
- qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
+ print "<div class=\"page_header\">\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));
--
1.7.4.rc0
--
Why do you think that git-instaweb can benefit from not having logo? You need gitweb.css anyway, so it is not much more trouble to serve corelist (Module::CoreList) says that Perl 5.8.0 has CGI.pm version 2.81; IIRC gitweb requires something later than 5.8.0 for good support of For what it is worth it: Acked-by: Jakub Narebski <jnareb@gmail.com> -- Jakub Narebski Poland --
Yep, that sentence is stale (it only applied in 1.7.1.x days) and Thanks for looking it over. --
