comparison templates/base.html @ 349:fb3ce83c1a48

download: use sources.js instead of jinja static templates See http://mercurial.selenic.com/wiki/BinaryReleasePlan 1. [hg-website] update the main page (templates/base.html and static/js/download.js) to use sources.js as a dynamic binary release information source instead of using a jinja template maintained as part of the web site. templates/data no longer required; removed. 2. [hg-website-content] update the /downloads page use the sources.js information also. This changes some of the detection and package naming, naturally, but that likely must be addressed in latest.dat files or in the protocol for creating sources.js.
author David Champion <dgc@uchicago.edu>
date Sat, 20 Nov 2010 19:53:07 -0600
parents 871e9821b5b9
children bb27170e2218
comparison
equal deleted inserted replaced
348:7cb309f3e33a 349:fb3ce83c1a48
1 {% from 'data' import downloads %}
2
3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4 "http://www.w3.org/TR/html4/loose.dtd"> 2 "http://www.w3.org/TR/html4/loose.dtd">
5 <html> 3 <html>
6 <head> 4 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <link href="/css/styles.css" type="text/css" rel="stylesheet"> 6 <link href="/css/styles.css" type="text/css" rel="stylesheet">
9 <script type="text/javascript" src="/js/typeface.js"></script> 7 <script type="text/javascript" src="/js/typeface.js"></script>
10 <script type="text/javascript" src="/js/optimer_regular.typeface.js"></script> 8 <script type="text/javascript" src="/js/optimer_regular.typeface.js"></script>
9 <script type="text/javascript" src="/js/common.js"></script>
10 <script type="text/javascript" src="/sources.js"></script>
11 <script type="text/javascript" src="/js/download.js"></script> 11 <script type="text/javascript" src="/js/download.js"></script>
12 <script type="text/javascript" src="/js/common.js"></script> 12 <script language="javascript">
13 <script language="javascript" type="text/javascript"> 13 Downloader.init(sources);
14 {% set download = downloads[downloads['current']] %} 14 var dl = Downloader.select();
15 var dl = new Download();
16 dl.register_download('Windows', "{{ download['Windows']}}");
17 dl.register_download('Mac OS X 10.6', "{{ download['Mac OS X 10.6']}}");
18 dl.register_download('Mac OS X 10.5', "{{ download['Mac OS X 10.5']}}");
19 dl.register_download('UNIX', "{{ download['Source code']}}");
20 dl.register_download('Linux', "{{ download['Source code']}}");
21 </script> 15 </script>
22 <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> 16 <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">
23 17
24 <title>Mercurial SCM</title> 18 <title>Mercurial SCM</title>
25 </head> 19 </head>
56 No content on this page yet. 50 No content on this page yet.
57 {% endblock %} 51 {% endblock %}
58 </div> 52 </div>
59 <div class="col"> 53 <div class="col">
60 {% block sidebar %} 54 {% block sidebar %}
61 <a class="download typeface-js" href="/downloads" onClick="javascript:return dl.os_link();"> 55 <a class="download typeface-js" href="/downloads" onClick="return dl.download();">
62 <strong>Download now</strong> 56 <strong>Download now</strong>
63 Mercurial <em>{{ downloads['current'] }}</em> 57 Mercurial <em><script language="Javascript">dl.write('version');</script></em>
64 <span><script language="javascript">dl.os_detection();</script></span> 58 <span><script language="javascript">dl.write('desc');</script></span>
65 </a> 59 </a>
66 <dl> 60 <dl>
67 <dt>Another OS?<br><em>Get Mercurial for:</em></dt> 61 <dt>Another OS?<br><em>Get Mercurial for:</em></dt>
68 <dd><a href="/downloads">Mac OS X</a></dd> 62 <dd><a href="/downloads">Mac OS X</a></dd>
69 <dd><a href="/downloads">Windows</a></dd> 63 <dd><a href="/downloads">Windows</a></dd>