comparison templates/base.html @ 478:c65b81353b8f

downloads: replace inline scripts with an onload function
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Wed, 10 May 2017 12:19:45 -0500
parents aec3b193e5af
children 175611e81401
comparison
equal deleted inserted replaced
477:aec3b193e5af 478:c65b81353b8f
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <link href="{{ url_for('static', filename='css/styles.css') }}" type="text/css" rel="stylesheet"> 6 <link href="{{ url_for('static', filename='css/styles.css') }}" type="text/css" rel="stylesheet">
7 <script type="text/javascript" src="{{ url_for('static', filename='js/common.js') }}"></script> 7 <script type="text/javascript" src="{{ url_for('static', filename='js/common.js') }}"></script>
8 <script type="text/javascript" src="{{ url_for('static', filename='sources.js') }}"></script> 8 <script type="text/javascript" src="{{ url_for('static', filename='sources.js') }}"></script>
9 <script type="text/javascript" src="{{ url_for('static', filename='js/download.js') }}"></script> 9 <script type="text/javascript" src="{{ url_for('static', filename='js/download.js') }}"></script>
10 <script language="javascript">
11 Downloader.init(sources);
12 var dl = Downloader.select();
13 </script>
14 <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> 10 <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">
15 11
16 <title>Mercurial SCM</title> 12 <title>Mercurial SCM</title>
17 </head> 13 </head>
18 <body id="home"> 14 <body id="home">
47 No content on this page yet. 43 No content on this page yet.
48 {% endblock %} 44 {% endblock %}
49 </div> 45 </div>
50 <div class="col"> 46 <div class="col">
51 {% block sidebar %} 47 {% block sidebar %}
52 <a class="download" href="/downloads" onClick="return dl.download();"> 48 <a class="download" href="/downloads" onClick="return window.dl.download();">
53 <strong>Download now</strong> 49 <strong>Download now</strong>
54 Mercurial <em><script language="Javascript">dl.write('version');</script></em> 50 Mercurial <em id="download-version"></em>
55 <span><script language="javascript">dl.write('desc');</script></span> 51 <span id="download-description"></span>
56 </a> 52 </a>
57 <dl> 53 <dl>
58 <dt>Another OS?<br><em>Get Mercurial for:</em></dt> 54 <dt>Another OS?<br><em>Get Mercurial for:</em></dt>
59 <dd><a href="/downloads">Mac OS X</a></dd> 55 <dd><a href="/downloads">Mac OS X</a></dd>
60 <dd><a href="/downloads">Windows</a></dd> 56 <dd><a href="/downloads">Windows</a></dd>