##// END OF EJS Templates
hgweb: support alternate logo url...
Steven Stallion -
r13964:616ad3f6 default
parent child Browse files
Show More
@@ -1092,6 +1092,9 b' The full set of options is:'
1092 Default is False.
1092 Default is False.
1093 ``ipv6``
1093 ``ipv6``
1094 Whether to use IPv6. Default is False.
1094 Whether to use IPv6. Default is False.
1095 ``logourl``
1096 Base URL to use for logos. If unset, ``http://mercurial.selenic.com/``
1097 will be used.
1095 ``name``
1098 ``name``
1096 Repository name to use in the web interface. Default is current
1099 Repository name to use in the web interface. Default is current
1097 working directory.
1100 working directory.
@@ -233,6 +233,7 b' class hgweb(object):'
233 port = req.env["SERVER_PORT"]
233 port = req.env["SERVER_PORT"]
234 port = port != default_port and (":" + port) or ""
234 port = port != default_port and (":" + port) or ""
235 urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port)
235 urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port)
236 logourl = self.config("web", "logourl", "http://mercurial.selenic.com/")
236 staticurl = self.config("web", "staticurl") or req.url + 'static/'
237 staticurl = self.config("web", "staticurl") or req.url + 'static/'
237 if not staticurl.endswith('/'):
238 if not staticurl.endswith('/'):
238 staticurl += '/'
239 staticurl += '/'
@@ -272,6 +273,7 b' class hgweb(object):'
272
273
273 tmpl = templater.templater(mapfile,
274 tmpl = templater.templater(mapfile,
274 defaults={"url": req.url,
275 defaults={"url": req.url,
276 "logourl": logourl,
275 "staticurl": staticurl,
277 "staticurl": staticurl,
276 "urlbase": urlbase,
278 "urlbase": urlbase,
277 "repo": self.reponame,
279 "repo": self.reponame,
@@ -347,6 +347,7 b' class hgwebdir(object):'
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 staticurl = config('web', 'staticurl') or url + 'static/'
351 staticurl = config('web', 'staticurl') or url + 'static/'
351 if not staticurl.endswith('/'):
352 if not staticurl.endswith('/'):
352 staticurl += '/'
353 staticurl += '/'
@@ -356,6 +357,7 b' class hgwebdir(object):'
356 "footer": footer,
357 "footer": footer,
357 "motd": motd,
358 "motd": motd,
358 "url": url,
359 "url": url,
360 "logourl": logourl,
359 "staticurl": staticurl,
361 "staticurl": staticurl,
360 "sessionvars": sessionvars})
362 "sessionvars": sessionvars})
361 return tmpl
363 return tmpl
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / bookmarks
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / bookmarks
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog
12 </div>
12 </div>
13
13
14 <form action="{url}log">
14 <form action="{url}log">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / error
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / error
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -9,7 +9,7 b''
9 <body>
9 <body>
10
10
11 <div class="page_header">
11 <div class="page_header">
12 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph
12 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph
13 </div>
13 </div>
14
14
15 <form action="{url}log">
15 <form action="{url}log">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / help
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -4,7 +4,7 b''
4 <body>
4 <body>
5
5
6 <div class="page_header">
6 <div class="page_header">
7 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a>
7 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a>
8 Repositories list
8 Repositories list
9 </div>
9 </div>
10
10
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -5,7 +5,7 b''
5 <body>
5 <body>
6
6
7 <div class="page_header">
7 <div class="page_header">
8 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a> Not found: {repo|escape}
8 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> Not found: {repo|escape}
9 </div>
9 </div>
10
10
11 <div class="page_body">
11 <div class="page_body">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search
12
12
13 <form action="{url}log">
13 <form action="{url}log">
14 {sessionvars%hiddenformentry}
14 {sessionvars%hiddenformentry}
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog
12 </div>
12 </div>
13
13
14 <form action="{url}log">
14 <form action="{url}log">
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary
12
12
13 <form action="{url}log">
13 <form action="{url}log">
14 {sessionvars%hiddenformentry}
14 {sessionvars%hiddenformentry}
@@ -8,7 +8,7 b''
8 <body>
8 <body>
9
9
10 <div class="page_header">
10 <div class="page_header">
11 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
11 <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
12 </div>
12 </div>
13
13
14 <div class="page_nav">
14 <div class="page_nav">
@@ -8,7 +8,7 b''
8 </div>
8 </div>
9
9
10 <div id="powered-by">
10 <div id="powered-by">
11 <p><a href="http://mercurial.selenic.com/" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
11 <p><a href="{logourl}" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
12 </div>
12 </div>
13
13
14 <div id="corner-top-left"></div>
14 <div id="corner-top-left"></div>
@@ -26,7 +26,7 b''
26 </div>
26 </div>
27
27
28 <div id="powered-by">
28 <div id="powered-by">
29 <p><a href="http://mercurial.selenic.com/" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
29 <p><a href="{logourl}" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
30 </div>
30 </div>
31
31
32 <div id="corner-top-left"></div>
32 <div id="corner-top-left"></div>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -5,7 +5,7 b''
5 <div class="container">
5 <div class="container">
6 <div class="menu">
6 <div class="menu">
7 <div class="logo">
7 <div class="logo">
8 <a href="http://mercurial.selenic.com/">
8 <a href="{logourl}">
9 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
9 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
10 </div>
10 </div>
11 <ul>
11 <ul>
@@ -6,7 +6,7 b''
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="http://mercurial.selenic.com/">
9 <a href="{logourl}">
10 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
10 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
@@ -6,7 +6,7 b''
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="http://mercurial.selenic.com/">
9 <a href="{logourl}">
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
@@ -6,7 +6,7 b''
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="http://mercurial.selenic.com/">
9 <a href="{logourl}">
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -6,7 +6,7 b''
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="http://mercurial.selenic.com/">
9 <a href="{logourl}">
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
@@ -11,7 +11,7 b''
11 <div class="container">
11 <div class="container">
12 <div class="menu">
12 <div class="menu">
13 <div class="logo">
13 <div class="logo">
14 <a href="http://mercurial.selenic.com/">
14 <a href="{logourl}">
15 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
16 </div>
16 </div>
17 <ul>
17 <ul>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -5,7 +5,7 b''
5
5
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <a href="http://mercurial.selenic.com/">
8 <a href="{logourl}">
9 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
9 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
10 </div>
10 </div>
11 <div class="main">
11 <div class="main">
@@ -6,7 +6,7 b''
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="http://mercurial.selenic.com/">
9 <a href="{logourl}">
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
10 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
@@ -6,7 +6,7 b''
6 <div class="container">
6 <div class="container">
7 <div class="menu">
7 <div class="menu">
8 <div class="logo">
8 <div class="logo">
9 <a href="http://mercurial.selenic.com/">
9 <a href="{logourl}">
10 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
10 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
11 </div>
11 </div>
12 <ul>
12 <ul>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -10,7 +10,7 b''
10 <div class="container">
10 <div class="container">
11 <div class="menu">
11 <div class="menu">
12 <div class="logo">
12 <div class="logo">
13 <a href="http://mercurial.selenic.com/">
13 <a href="{logourl}">
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
14 <img src="{staticurl}hglogo.png" alt="mercurial" /></a>
15 </div>
15 </div>
16 <ul>
16 <ul>
@@ -1,6 +1,6 b''
1 {motd}
1 {motd}
2 <div class="logo">
2 <div class="logo">
3 <a href="http://mercurial.selenic.com/">
3 <a href="{logourl}">
4 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
4 <img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
5 </div>
5 </div>
6
6
@@ -29,6 +29,7 b' annotate an annotated file'
29 entries the entries relevant to the page
29 entries the entries relevant to the page
30
30
31 url base url of hgweb interface
31 url base url of hgweb interface
32 logourl base url of logo
32 staticurl base url for static resources
33 staticurl base url for static resources
33
34
34
35
General Comments 0
You need to be logged in to leave comments. Login now