* [PATCH] gitweb: use out-of-line GIT logo.
@ 2006-07-30 22:38 Martin Waitz
2006-07-31 3:59 ` Luben Tuikov
0 siblings, 1 reply; 4+ messages in thread
From: Martin Waitz @ 2006-07-30 22:38 UTC (permalink / raw)
To: git
Use the normal web server instead of the CGI to provide the git logo,
just like the gitweb.css.
Signed-off-by: Martin Waitz <tali@admingilde.org>
---
Makefile | 2 ++
gitweb/README | 2 ++
gitweb/git-logo.png | Bin
gitweb/gitweb.pl | 29 ++++-------------------------
4 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/Makefile b/Makefile
index bd59d6b58d1cfcaecd033f186d7c2cc537416b75..40e129490b337a70f0ee5c60ce25980359e658c9 100644
--- a/Makefile
+++ b/Makefile
@@ -122,6 +122,7 @@ GITWEB_PROJECTROOT = /pub/git
GITWEB_LIST =
GITWEB_HOMETEXT = indextext.html
GITWEB_CSS = gitweb.css
+GITWEB_LOGO = git-logo.png
export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
@@ -584,6 +585,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.pl
-e 's|@@GITWEB_LIST@@|$(GITWEB_LIST)|g' \
-e 's|@@GITWEB_HOMETEXT@@|$(GITWEB_HOMETEXT)|g' \
-e 's|@@GITWEB_CSS@@|$(GITWEB_CSS)|g' \
+ -e 's|@@GITWEB_LOGO@@|$(GITWEB_LOGO)|g' \
$< >$@+
chmod +x $@+
mv $@+ $@
diff --git a/gitweb/README b/gitweb/README
index ed939e2fb5264cce24e770272583b12372c3ab68..1b2180c7314ea3d10db78c88b48092a70491f8b8 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -21,6 +21,8 @@ You can specify the following configurat
overview page.
* GITWEB_CSS
Points to the location where you put gitweb.css on your web server.
+ * GITWEB_LOGO
+ Points to the location where you put git-logo.png on your web server.
Any comment/question/concern to:
Kay Sievers <kay.sievers@vrfy.org>
diff --git a/gitweb/git-logo.png b/gitweb/git-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..16ae8d5382de5ffe63b54139245143513a87446e
GIT binary patch
literal 208
zc%17D@N?(olHy`uVBq!ia0vp^9zZP3!VDyJZ(h*_QW60^A+G=b|4&GW-LQTYLj%LP
zv&RoGFuZv2?ECj`Q+bxV1Jx9Jx;TbtoKN;hS77mqk>KLcN(xR?VB+A-bX~J>A)^7$
z<ODOdpotq91+P5}P07hQlas@<h^Ig+iB0QZlI&(irr;$UFBq65)WQU>JXDx2{a_29
zsY;<{(@cXMleq+Ux^^7wU9iYSkxkvP$)WY2Yo|g1Bf}C~#iK$pv;G0CXYh3Ob6Mw<
G&;$VMfkjjR
diff --git a/gitweb/gitweb.pl b/gitweb/gitweb.pl
index 8e05c335f801d4c52a9b348fa56fccfae36ce621..e6e9f83076630958d0134bfbb29989882f6f1d0d 100755
--- a/gitweb/gitweb.pl
+++ b/gitweb/gitweb.pl
@@ -51,6 +51,8 @@ our $home_text = "@@GITWEB_HOMETEXT@@";
# URI of default stylesheet
our $stylesheet = "@@GITWEB_CSS@@";
+# URI of GIT logo
+our $logo = "@@GITWEB_LOGO@@";
# source of projects list
our $projects_list = "@@GITWEB_LIST@@" || "$projectroot";
@@ -70,10 +72,7 @@ if (defined $action) {
undef $action;
die_error(undef, "Invalid action parameter.");
}
- if ($action eq "git-logo.png") {
- git_logo();
- exit;
- } elsif ($action eq "opml") {
+ if ($action eq "opml") {
git_opml();
exit;
}
@@ -320,7 +319,7 @@ sub git_header_html {
EOF
print "<div class=\"page_header\">\n" .
"<a href=\"http://www.kernel.org/pub/software/scm/git/docs/\" title=\"git documentation\">" .
- "<img src=\"$my_uri?" . esc_param("a=git-logo.png") . "\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
+ "<img src=\"$logo\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
"</a>\n";
print $cgi->a({-href => esc_param($home_link)}, "projects") . " / ";
if (defined $project) {
@@ -755,26 +754,6 @@ sub date_str {
return %date;
}
-# git-logo (cached in browser for one day)
-sub git_logo {
- binmode STDOUT, ':raw';
- print $cgi->header(-type => 'image/png', -expires => '+1d');
- # cat git-logo.png | hexdump -e '16/1 " %02x" "\n"' | sed 's/ /\\x/g'
- print "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52" .
- "\x00\x00\x00\x48\x00\x00\x00\x1b\x04\x03\x00\x00\x00\x2d\xd9\xd4" .
- "\x2d\x00\x00\x00\x18\x50\x4c\x54\x45\xff\xff\xff\x60\x60\x5d\xb0" .
- "\xaf\xaa\x00\x80\x00\xce\xcd\xc7\xc0\x00\x00\xe8\xe8\xe6\xf7\xf7" .
- "\xf6\x95\x0c\xa7\x47\x00\x00\x00\x73\x49\x44\x41\x54\x28\xcf\x63" .
- "\x48\x67\x20\x04\x4a\x5c\x18\x0a\x08\x2a\x62\x53\x61\x20\x02\x08" .
- "\x0d\x69\x45\xac\xa1\xa1\x01\x30\x0c\x93\x60\x36\x26\x52\x91\xb1" .
- "\x01\x11\xd6\xe1\x55\x64\x6c\x6c\xcc\x6c\x6c\x0c\xa2\x0c\x70\x2a" .
- "\x62\x06\x2a\xc1\x62\x1d\xb3\x01\x02\x53\xa4\x08\xe8\x00\x03\x18" .
- "\x26\x56\x11\xd4\xe1\x20\x97\x1b\xe0\xb4\x0e\x35\x24\x71\x29\x82" .
- "\x99\x30\xb8\x93\x0a\x11\xb9\x45\x88\xc1\x8d\xa0\xa2\x44\x21\x06" .
- "\x27\x41\x82\x40\x85\xc1\x45\x89\x20\x70\x01\x00\xa4\x3d\x21\xc5" .
- "\x12\x1c\x9a\xfe\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82";
-}
-
sub get_file_owner {
my $path = shift;
--
1.4.2.rc2.gf055
--
Martin Waitz
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gitweb: use out-of-line GIT logo.
2006-07-30 22:38 [PATCH] gitweb: use out-of-line GIT logo Martin Waitz
@ 2006-07-31 3:59 ` Luben Tuikov
2006-07-31 5:21 ` Jakub Narebski
2006-07-31 7:02 ` Martin Waitz
0 siblings, 2 replies; 4+ messages in thread
From: Luben Tuikov @ 2006-07-31 3:59 UTC (permalink / raw)
To: Martin Waitz, git
--- Martin Waitz <tali@admingilde.org> wrote:
> Use the normal web server instead of the CGI to provide the git logo,
> just like the gitweb.css.
NACK. I'd really rather keep the logo (which is essential) in the
file itself. This would mean one less file to worry about.
Luben
> Signed-off-by: Martin Waitz <tali@admingilde.org>
> ---
> Makefile | 2 ++
> gitweb/README | 2 ++
> gitweb/git-logo.png | Bin
> gitweb/gitweb.pl | 29 ++++-------------------------
> 4 files changed, 8 insertions(+), 25 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index bd59d6b58d1cfcaecd033f186d7c2cc537416b75..40e129490b337a70f0ee5c60ce25980359e658c9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -122,6 +122,7 @@ GITWEB_PROJECTROOT = /pub/git
> GITWEB_LIST =
> GITWEB_HOMETEXT = indextext.html
> GITWEB_CSS = gitweb.css
> +GITWEB_LOGO = git-logo.png
>
> export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
>
> @@ -584,6 +585,7 @@ gitweb/gitweb.cgi: gitweb/gitweb.pl
> -e 's|@@GITWEB_LIST@@|$(GITWEB_LIST)|g' \
> -e 's|@@GITWEB_HOMETEXT@@|$(GITWEB_HOMETEXT)|g' \
> -e 's|@@GITWEB_CSS@@|$(GITWEB_CSS)|g' \
> + -e 's|@@GITWEB_LOGO@@|$(GITWEB_LOGO)|g' \
> $< >$@+
> chmod +x $@+
> mv $@+ $@
> diff --git a/gitweb/README b/gitweb/README
> index ed939e2fb5264cce24e770272583b12372c3ab68..1b2180c7314ea3d10db78c88b48092a70491f8b8 100644
> --- a/gitweb/README
> +++ b/gitweb/README
> @@ -21,6 +21,8 @@ You can specify the following configurat
> overview page.
> * GITWEB_CSS
> Points to the location where you put gitweb.css on your web server.
> + * GITWEB_LOGO
> + Points to the location where you put git-logo.png on your web server.
>
> Any comment/question/concern to:
> Kay Sievers <kay.sievers@vrfy.org>
> diff --git a/gitweb/git-logo.png b/gitweb/git-logo.png
> new file mode 100644
> index 0000000000000000000000000000000000000000..16ae8d5382de5ffe63b54139245143513a87446e
> GIT binary patch
> literal 208
> zc%17D@N?(olHy`uVBq!ia0vp^9zZP3!VDyJZ(h*_QW60^A+G=b|4&GW-LQTYLj%LP
> zv&RoGFuZv2?ECj`Q+bxV1Jx9Jx;TbtoKN;hS77mqk>KLcN(xR?VB+A-bX~J>A)^7$
> z<ODOdpotq91+P5}P07hQlas@<h^Ig+iB0QZlI&(irr;$UFBq65)WQU>JXDx2{a_29
> zsY;<{(@cXMleq+Ux^^7wU9iYSkxkvP$)WY2Yo|g1Bf}C~#iK$pv;G0CXYh3Ob6Mw<
> G&;$VMfkjjR
>
> diff --git a/gitweb/gitweb.pl b/gitweb/gitweb.pl
> index 8e05c335f801d4c52a9b348fa56fccfae36ce621..e6e9f83076630958d0134bfbb29989882f6f1d0d 100755
> --- a/gitweb/gitweb.pl
> +++ b/gitweb/gitweb.pl
> @@ -51,6 +51,8 @@ our $home_text = "@@GITWEB_HOMETEXT@@";
>
> # URI of default stylesheet
> our $stylesheet = "@@GITWEB_CSS@@";
> +# URI of GIT logo
> +our $logo = "@@GITWEB_LOGO@@";
>
> # source of projects list
> our $projects_list = "@@GITWEB_LIST@@" || "$projectroot";
> @@ -70,10 +72,7 @@ if (defined $action) {
> undef $action;
> die_error(undef, "Invalid action parameter.");
> }
> - if ($action eq "git-logo.png") {
> - git_logo();
> - exit;
> - } elsif ($action eq "opml") {
> + if ($action eq "opml") {
> git_opml();
> exit;
> }
> @@ -320,7 +319,7 @@ sub git_header_html {
> EOF
> print "<div class=\"page_header\">\n" .
> "<a href=\"http://www.kernel.org/pub/software/scm/git/docs/\" title=\"git
> documentation\">" .
> - "<img src=\"$my_uri?" . esc_param("a=git-logo.png") . "\" width=\"72\" height=\"27\"
> alt=\"git\" style=\"float:right; border-width:0px;\"/>" .
> + "<img src=\"$logo\" width=\"72\" height=\"27\" alt=\"git\" style=\"float:right;
> border-width:0px;\"/>" .
> "</a>\n";
> print $cgi->a({-href => esc_param($home_link)}, "projects") . " / ";
> if (defined $project) {
> @@ -755,26 +754,6 @@ sub date_str {
> return %date;
> }
>
> -# git-logo (cached in browser for one day)
> -sub git_logo {
> - binmode STDOUT, ':raw';
> - print $cgi->header(-type => 'image/png', -expires => '+1d');
> - # cat git-logo.png | hexdump -e '16/1 " %02x" "\n"' | sed 's/ /\\x/g'
> - print "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52" .
> - "\x00\x00\x00\x48\x00\x00\x00\x1b\x04\x03\x00\x00\x00\x2d\xd9\xd4" .
> - "\x2d\x00\x00\x00\x18\x50\x4c\x54\x45\xff\xff\xff\x60\x60\x5d\xb0" .
> - "\xaf\xaa\x00\x80\x00\xce\xcd\xc7\xc0\x00\x00\xe8\xe8\xe6\xf7\xf7" .
> - "\xf6\x95\x0c\xa7\x47\x00\x00\x00\x73\x49\x44\x41\x54\x28\xcf\x63" .
> - "\x48\x67\x20\x04\x4a\x5c\x18\x0a\x08\x2a\x62\x53\x61\x20\x02\x08" .
> - "\x0d\x69\x45\xac\xa1\xa1\x01\x30\x0c\x93\x60\x36\x26\x52\x91\xb1" .
> - "\x01\x11\xd6\xe1\x55\x64\x6c\x6c\xcc\x6c\x6c\x0c\xa2\x0c\x70\x2a" .
> - "\x62\x06\x2a\xc1\x62\x1d\xb3\x01\x02\x53\xa4\x08\xe8\x00\x03\x18" .
> - "\x26\x56\x11\xd4\xe1\x20\x97\x1b\xe0\xb4\x0e\x35\x24\x71\x29\x82" .
> - "\x99\x30\xb8\x93\x0a\x11\xb9\x45\x88\xc1\x8d\xa0\xa2\x44\x21\x06" .
> - "\x27\x41\x82\x40\x85\xc1\x45\x89\x20\x70\x01\x00\xa4\x3d\x21\xc5" .
> - "\x12\x1c\x9a\xfe\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82";
> -}
> -
> sub get_file_owner {
> my $path = shift;
>
> --
> 1.4.2.rc2.gf055
>
> --
> Martin Waitz
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitweb: use out-of-line GIT logo.
2006-07-31 3:59 ` Luben Tuikov
@ 2006-07-31 5:21 ` Jakub Narebski
2006-07-31 7:02 ` Martin Waitz
1 sibling, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2006-07-31 5:21 UTC (permalink / raw)
To: git
Luben Tuikov wrote:
> --- Martin Waitz <tali@admingilde.org> wrote:
>
>> Use the normal web server instead of the CGI to provide the git logo,
>> just like the gitweb.css.
>
> NACK. I'd really rather keep the logo (which is essential) in the
> file itself. This would mean one less file to worry about.
I'm not sure. On the one hand this introduces yet another file which we have
to worry about, on the other it probably help performance. Any hard
numbers?
The difference with gitweb.css is that you edit gitweb.css, and that
inclused CSS can be cached; we could probably do the same trick like with
logo (i.e. embed it in gitweb.css, but still use
<link rel="stylesheet" type="text/css" href="$my_uri?a=gitweb.css"/>
and not
<style type="text/css">
...
</style>
Besides, mixed language files are hard to syntax highlight correctly...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitweb: use out-of-line GIT logo.
2006-07-31 3:59 ` Luben Tuikov
2006-07-31 5:21 ` Jakub Narebski
@ 2006-07-31 7:02 ` Martin Waitz
1 sibling, 0 replies; 4+ messages in thread
From: Martin Waitz @ 2006-07-31 7:02 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
hoi :)
On Sun, Jul 30, 2006 at 08:59:04PM -0700, Luben Tuikov wrote:
> --- Martin Waitz <tali@admingilde.org> wrote:
>
> > Use the normal web server instead of the CGI to provide the git logo,
> > just like the gitweb.css.
>
> NACK. I'd really rather keep the logo (which is essential) in the
> file itself. This would mean one less file to worry about.
we could default to use git-logo.png from kernel.org if you care about
easy home installations.
For each serious gitweb site it should not be a problem to put the logo
into their image folder.
And I really think that the .css is much more essential then the logo
;-). So perhaps use kernel.org for the .css by default, too?
--
Martin Waitz
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-31 7:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-30 22:38 [PATCH] gitweb: use out-of-line GIT logo Martin Waitz
2006-07-31 3:59 ` Luben Tuikov
2006-07-31 5:21 ` Jakub Narebski
2006-07-31 7:02 ` Martin Waitz
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).