[PATCH hg-website-content] download: use sources.js instead of jinja static templates

David Champion dgc at uchicago.edu
Sun Nov 21 12:51:27 CST 2010


# HG changeset patch
# User David Champion <dgc at uchicago.edu>
# Date 1290304387 21600
# Node ID 6e7e8b5aa2c317fb1d185265b87d64f054e6c9fa
# Parent  571b7970a0ba32b912ec07acad337b9d9669656b
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.

diff -r 571b7970a0ba -r 6e7e8b5aa2c3 downloads/index.html
--- a/downloads/index.html	Sun Nov 21 00:22:46 2010 -0600
+++ b/downloads/index.html	Sat Nov 20 19:53:07 2010 -0600
@@ -6,19 +6,18 @@
     <table border="0" cellspacing="0" cellpadding="0" class="latest" width="100%">
         <thead>
             <tr>
-                <th>Mercurial {{downloads['current']}}</th>
+                <th>Mercurial
+                    <script language="javascript">
+                    dl.write('version');
+                    </script></th>
                 <th></th>
                 <th></th>
             </tr>
         </thead>
         <tbody>
-        {% for os, link in downloads[downloads['current']]|dictsort %}
-            <tr>
-                <td>{{os}}</td>
-                <td></td>
-                <td><a href="{{link}}">download</a></td>
-            </tr>
-        {% endfor %}
+            <script language="javascript">
+            Downloader.listall();
+            </script>
         </tbody>
     </table>
 




More information about the Mercurial-devel mailing list