Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_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 | 924c82157d46 |
children | b55c1c6a793e |
comparison
equal
deleted
inserted
replaced
14912:ec46a7da9f2c | 14913:44382887d012 |
---|---|
346 vars['style'] = style | 346 vars['style'] = style |
347 | 347 |
348 start = url[-1] == '?' and '&' or '?' | 348 start = url[-1] == '?' and '&' or '?' |
349 sessionvars = webutil.sessionvars(vars, start) | 349 sessionvars = webutil.sessionvars(vars, start) |
350 logourl = config('web', 'logourl', 'http://mercurial.selenic.com/') | 350 logourl = config('web', 'logourl', 'http://mercurial.selenic.com/') |
351 logoimg = config('web', 'logoimg', 'hglogo.png') | |
351 staticurl = config('web', 'staticurl') or url + 'static/' | 352 staticurl = config('web', 'staticurl') or url + 'static/' |
352 if not staticurl.endswith('/'): | 353 if not staticurl.endswith('/'): |
353 staticurl += '/' | 354 staticurl += '/' |
354 | 355 |
355 tmpl = templater.templater(mapfile, | 356 tmpl = templater.templater(mapfile, |
356 defaults={"header": header, | 357 defaults={"header": header, |
357 "footer": footer, | 358 "footer": footer, |
358 "motd": motd, | 359 "motd": motd, |
359 "url": url, | 360 "url": url, |
360 "logourl": logourl, | 361 "logourl": logourl, |
362 "logoimg": logoimg, | |
361 "staticurl": staticurl, | 363 "staticurl": staticurl, |
362 "sessionvars": sessionvars}) | 364 "sessionvars": sessionvars}) |
363 return tmpl | 365 return tmpl |
364 | 366 |
365 def updatereqenv(self, env): | 367 def updatereqenv(self, env): |