* [PATCH 0/2] gitweb: make logo optional
@ 2011-01-04 5:02 Jonathan Nieder
2011-01-04 5:02 ` [PATCH 1/2] gitweb: skip logo in atom feed when there is none Jonathan Nieder
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jonathan Nieder @ 2011-01-04 5:02 UTC (permalink / raw)
To: git; +Cc: John 'Warthog9' Hawley, Jakub Narebski, Eric Wong
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] gitweb: skip logo in atom feed when there is none
2011-01-04 5:02 [PATCH 0/2] gitweb: make logo optional Jonathan Nieder
@ 2011-01-04 5:02 ` Jonathan Nieder
2011-01-05 0:25 ` Jakub Narebski
2011-01-04 5:05 ` [PATCH 2/2] gitweb: make logo optional Jonathan Nieder
2011-01-04 23:24 ` [PATCH 0/2] " Eric Wong
2 siblings, 1 reply; 8+ messages in thread
From: Jonathan Nieder @ 2011-01-04 5:02 UTC (permalink / raw)
To: git; +Cc: John 'Warthog9' Hawley, Jakub Narebski, Eric Wong
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] gitweb: make logo optional
2011-01-04 5:02 [PATCH 0/2] gitweb: make logo optional Jonathan Nieder
2011-01-04 5:02 ` [PATCH 1/2] gitweb: skip logo in atom feed when there is none Jonathan Nieder
@ 2011-01-04 5:05 ` Jonathan Nieder
2011-01-04 11:52 ` Jakub Narebski
2011-01-04 23:24 ` [PATCH 0/2] " Eric Wong
2 siblings, 1 reply; 8+ messages in thread
From: Jonathan Nieder @ 2011-01-04 5:05 UTC (permalink / raw)
To: git; +Cc: John 'Warthog9' Hawley, Jakub Narebski, Eric Wong
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] gitweb: make logo optional
2011-01-04 5:05 ` [PATCH 2/2] gitweb: make logo optional Jonathan Nieder
@ 2011-01-04 11:52 ` Jakub Narebski
2011-01-04 16:29 ` Jonathan Nieder
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2011-01-04 11:52 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, John 'Warthog9' Hawley, Eric Wong
On Tue, 4 Dec 2011, Jonathan Nieder wrote:
> Some sites may not want to have a logo at all. In particular, git
> instaweb can benefit from this.
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
additional static file, git-logo.png.
>
> 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.)
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
Unicode (Encode module).
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
For what it is worth it:
Acked-by: Jakub Narebski <jnareb@gmail.com>
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] gitweb: make logo optional
2011-01-04 11:52 ` Jakub Narebski
@ 2011-01-04 16:29 ` Jonathan Nieder
0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Nieder @ 2011-01-04 16:29 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git, John 'Warthog9' Hawley, Eric Wong
Jakub Narebski wrote:
> On Tue, 4 Dec 2011, Jonathan Nieder wrote:
>> Some sites may not want to have a logo at all. In particular, git
>> instaweb can benefit from this.
>
> 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
> additional static file, git-logo.png.
Yep, that sentence is stale (it only applied in 1.7.1.x days) and
should have been removed.
> 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
> Unicode (Encode module).
>
>>
>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
>
> For what it is worth it:
>
> Acked-by: Jakub Narebski <jnareb@gmail.com>
Thanks for looking it over.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] gitweb: make logo optional
2011-01-04 5:02 [PATCH 0/2] gitweb: make logo optional Jonathan Nieder
2011-01-04 5:02 ` [PATCH 1/2] gitweb: skip logo in atom feed when there is none Jonathan Nieder
2011-01-04 5:05 ` [PATCH 2/2] gitweb: make logo optional Jonathan Nieder
@ 2011-01-04 23:24 ` Eric Wong
2 siblings, 0 replies; 8+ messages in thread
From: Eric Wong @ 2011-01-04 23:24 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, John 'Warthog9' Hawley, Jakub Narebski
Jonathan Nieder <jrnieder@gmail.com> wrote:
> 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
This series looks good to me (especially considering my strong
dislike of logos/icons on the web :>)
Acked-by: Eric Wong <normalperson@yhbt.net>
--
Eric Wong
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] gitweb: skip logo in atom feed when there is none
2011-01-04 5:02 ` [PATCH 1/2] gitweb: skip logo in atom feed when there is none Jonathan Nieder
@ 2011-01-05 0:25 ` Jakub Narebski
2011-01-05 0:45 ` Junio C Hamano
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2011-01-05 0:25 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, John 'Warthog9' Hawley, Eric Wong
Jonathan Nieder wrote:
> 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>
Good catch. As an obvious bugfix:
Acked-by: Jakub Narebski <jnareb@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
>
>
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] gitweb: skip logo in atom feed when there is none
2011-01-05 0:25 ` Jakub Narebski
@ 2011-01-05 0:45 ` Junio C Hamano
0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2011-01-05 0:45 UTC (permalink / raw)
To: Jakub Narebski
Cc: Jonathan Nieder, git, John 'Warthog9' Hawley, Eric Wong
Thanks, all.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-01-05 0:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 5:02 [PATCH 0/2] gitweb: make logo optional Jonathan Nieder
2011-01-04 5:02 ` [PATCH 1/2] gitweb: skip logo in atom feed when there is none Jonathan Nieder
2011-01-05 0:25 ` Jakub Narebski
2011-01-05 0:45 ` Junio C Hamano
2011-01-04 5:05 ` [PATCH 2/2] gitweb: make logo optional Jonathan Nieder
2011-01-04 11:52 ` Jakub Narebski
2011-01-04 16:29 ` Jonathan Nieder
2011-01-04 23:24 ` [PATCH 0/2] " Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).