From: Junio C Hamano <junkio@cox.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation
Date: Sat, 07 Oct 2006 01:36:26 -0700 [thread overview]
Message-ID: <7viriwwmid.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 200610061231.06017.jnareb@gmail.com
Jakub Narebski <jnareb@gmail.com> writes:
> Rename $githelp_url and $githelp_label to $logo_url and $logo_label to
> be more obvious what they refer to; while at it add commented out
> previous contents (git documentation at kernel.org). Add comment about
> logo size.
>
> Use $cgi->a(...) to generate Git logo link; it automatically escapes
> attribute values when it is needed. Escape href attribute using
> esc_url instead of (incorrect!) esc_html.
In principle, I am not sure renaming the variables is a good
idea in general. Renaming them means you are burning people who
have custom help link defined in their gitweb_config.perl file,
so unless the new variable names are ten times better than the
current one I do not think it is worth doing.
These variables, however, have never been in any official
release nor -rc yet, and have only been there for exactly two
weeks, so if we are going to rename them, we'd better do so now.
And the variables are about the same thing described by $logo
variable, so the new names probably make more sense.
Having said that, I am wondering if it is worth doing something
like this:
sub img_button {
my $it = $_[0];
my @attr = ();
for my $attr (qw(src width height alt class id)) {
next unless exists $it->{$attr};
push @attr, "$attr=\"" . esc_attr($it->{$attr}) . '"';
}
my $img = '<img ' . join(' ', @attr) . ' />';
print $cgi->a({ -href => esc_url($it->{'url'}),
-title => esc_attr($it->{'title'}),
}, $img);
}
our %logo = (
# logo image button
src => '++GITWEB_LOGO++',
width => 72,
height => 27,
alt => 'git logo',
# where that link leads to
url => 'http:/git.or.cz/',
title => 'git homepage',
);
next prev parent reply other threads:[~2006-10-07 8:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-19 21:27 [RFC][PATCH] gitweb: Make the Git logo link target to point to the homepage Petr Baudis
2006-09-23 12:57 ` Petr Baudis
2006-09-23 19:36 ` Junio C Hamano
2006-09-23 19:46 ` Petr Baudis
2006-10-05 20:47 ` Petr Baudis
2006-10-05 21:23 ` Junio C Hamano
2006-10-05 21:34 ` Junio C Hamano
2006-10-05 23:57 ` Petr Baudis
2006-09-23 19:54 ` Jakub Narebski
2006-09-23 20:46 ` Junio C Hamano
2006-10-06 10:31 ` [PATCH] gitweb: Cleanup Git logo and Git logo target generation Jakub Narebski
2006-10-07 8:36 ` Junio C Hamano [this message]
2006-10-07 9:58 ` Jakub Narebski
2006-10-07 14:14 ` Alan Chandler
2006-10-08 13:31 ` Jakub Narebski
2006-10-08 19:47 ` Junio C Hamano
2006-10-08 20:10 ` Petr Baudis
2006-10-08 20:33 ` Junio C Hamano
2006-10-08 20:54 ` Jakub Narebski
2006-10-09 0:54 ` Junio C Hamano
2006-10-09 7:14 ` Jakub Narebski
2006-10-09 9:00 ` Junio C Hamano
2006-10-09 9:26 ` Jakub Narebski
2006-10-09 20:36 ` Petr Baudis
2006-10-08 20:17 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7viriwwmid.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.