# HG changeset patch # User Angel Ezquerra # Date 2011-07-21 13:10:16 # Node ID 44382887d0122c518d16a5e19487b5a0c31d2738 # Parent ec46a7da9f2c9c7c68dcb9be48a920c70a6e6f12 hgweb: add a "web/logoimg" setting to customize the web logo image This change complements the existing web/logourl setting, and lets the user customize the logo image that is shown on many of the hg server pages. If this setting is not set, hglogo.png is used. diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -235,6 +235,7 @@ class hgweb(object): port = port != default_port and (":" + port) or "" urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port) logourl = self.config("web", "logourl", "http://mercurial.selenic.com/") + logoimg = self.config("web", "logoimg", "hglogo.png") staticurl = self.config("web", "staticurl") or req.url + 'static/' if not staticurl.endswith('/'): staticurl += '/' @@ -275,6 +276,7 @@ class hgweb(object): tmpl = templater.templater(mapfile, defaults={"url": req.url, "logourl": logourl, + "logoimg": logoimg, "staticurl": staticurl, "urlbase": urlbase, "repo": self.reponame, diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -348,6 +348,7 @@ class hgwebdir(object): start = url[-1] == '?' and '&' or '?' sessionvars = webutil.sessionvars(vars, start) logourl = config('web', 'logourl', 'http://mercurial.selenic.com/') + logoimg = config('web', 'logoimg', 'hglogo.png') staticurl = config('web', 'staticurl') or url + 'static/' if not staticurl.endswith('/'): staticurl += '/' @@ -358,6 +359,7 @@ class hgwebdir(object): "motd": motd, "url": url, "logourl": logourl, + "logoimg": logoimg, "staticurl": staticurl, "sessionvars": sessionvars}) return tmpl diff --git a/mercurial/templates/monoblue/footer.tmpl b/mercurial/templates/monoblue/footer.tmpl --- a/mercurial/templates/monoblue/footer.tmpl +++ b/mercurial/templates/monoblue/footer.tmpl @@ -9,7 +9,7 @@
-

mercurial

+

mercurial

diff --git a/mercurial/templates/monoblue/index.tmpl b/mercurial/templates/monoblue/index.tmpl --- a/mercurial/templates/monoblue/index.tmpl +++ b/mercurial/templates/monoblue/index.tmpl @@ -26,7 +26,7 @@
-

mercurial

+

mercurial

diff --git a/mercurial/templates/paper/bookmarks.tmpl b/mercurial/templates/paper/bookmarks.tmpl --- a/mercurial/templates/paper/bookmarks.tmpl +++ b/mercurial/templates/paper/bookmarks.tmpl @@ -11,7 +11,7 @@