git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 7, 2006, 09:58 UTC
Message-ID
<200610071158.26211.jnareb@gmail.com>
In-Reply-To
<7viriwwmid.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 28 quoted lines
> 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',
> );
You forgot to add style, i.e. either id => 'logo' or class => 'logo'. 

I'm not sure if it is worth complication. We have similar situation (although without image) with $home_link and $home_link_str (as with $logo, $logo_url, $logo_label).

I wonder how many people use non-standard logo image, or non standard favicon...

-- 
Jakub Narebski
Poland
Previous: Junio C HamanoNext: Alan Chandler
Message 13 of 25 in “gitweb: Make the Git logo link target to point to the homepage”
  1. Petr BaudisSep 19, 2006
  2. Petr BaudisSep 23, 2006
  3. Junio C HamanoSep 23, 2006
  4. Petr BaudisSep 23, 2006
  5. Petr BaudisOct 5, 2006
  6. Junio C HamanoOct 5, 2006
  7. Junio C HamanoOct 5, 2006
  8. Petr BaudisOct 5, 2006
  9. Jakub NarebskiSep 23, 2006
  10. Junio C HamanoSep 23, 2006
  11. gitweb: Cleanup Git logo and Git logo target generationJakub Narebski, Oct 6, 2006
  12. Junio C HamanoOct 7, 2006
  13. Jakub NarebskiOct 7, 2006
  14. Alan ChandlerOct 7, 2006
  15. Jakub NarebskiOct 8, 2006
  16. Junio C HamanoOct 8, 2006
  17. Petr BaudisOct 8, 2006
  18. Junio C HamanoOct 8, 2006
  19. Jakub NarebskiOct 8, 2006
  20. Junio C HamanoOct 9, 2006
  21. Jakub NarebskiOct 9, 2006
  22. Junio C HamanoOct 9, 2006
  23. Jakub NarebskiOct 9, 2006
  24. Petr BaudisOct 9, 2006
  25. gitweb: Cleanup Git logo and Git logo target generationJakub Narebski, Oct 8, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.