Mercurial > hg
comparison mercurial/hgweb/hgweb_mod.py @ 14913:44382887d012
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.
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Thu, 21 Jul 2011 15:10:16 +0200 |
parents | a1c31c64bcd3 |
children | 6ee6ecf1ee89 |
comparison
equal
deleted
inserted
replaced
14912:ec46a7da9f2c | 14913:44382887d012 |
---|---|
233 | 233 |
234 port = req.env["SERVER_PORT"] | 234 port = req.env["SERVER_PORT"] |
235 port = port != default_port and (":" + port) or "" | 235 port = port != default_port and (":" + port) or "" |
236 urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port) | 236 urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port) |
237 logourl = self.config("web", "logourl", "http://mercurial.selenic.com/") | 237 logourl = self.config("web", "logourl", "http://mercurial.selenic.com/") |
238 logoimg = self.config("web", "logoimg", "hglogo.png") | |
238 staticurl = self.config("web", "staticurl") or req.url + 'static/' | 239 staticurl = self.config("web", "staticurl") or req.url + 'static/' |
239 if not staticurl.endswith('/'): | 240 if not staticurl.endswith('/'): |
240 staticurl += '/' | 241 staticurl += '/' |
241 | 242 |
242 # some functions for the templater | 243 # some functions for the templater |
273 # create the templater | 274 # create the templater |
274 | 275 |
275 tmpl = templater.templater(mapfile, | 276 tmpl = templater.templater(mapfile, |
276 defaults={"url": req.url, | 277 defaults={"url": req.url, |
277 "logourl": logourl, | 278 "logourl": logourl, |
279 "logoimg": logoimg, | |
278 "staticurl": staticurl, | 280 "staticurl": staticurl, |
279 "urlbase": urlbase, | 281 "urlbase": urlbase, |
280 "repo": self.reponame, | 282 "repo": self.reponame, |
281 "header": header, | 283 "header": header, |
282 "footer": footer, | 284 "footer": footer, |