diff templates/downloads/index.html @ 397:29d4b5e45423

Use flask to render site and get rid of submodules We don't want to use statically generated html files anymore. We are using flask to do the routing and render the templates for now. This means we also get rid of the submoduels and put everything together in templates/.
author David Soria Parra <davidsp@fb.com>
date Fri, 07 Mar 2014 14:47:13 -0800
parents
children 3d0f1f7cee05
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/downloads/index.html	Fri Mar 07 14:47:13 2014 -0800
@@ -0,0 +1,121 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+    <h1>Mercurial downloads</h1>
+    <script language="javascript">
+        var versions = Downloader.versions();
+        var more = Downloader.maxversions &&
+                   versions.length > Downloader.maxversions;
+
+        // Show tables for Downloader.maxversions versions
+        for (i in versions) {
+            if (more && i >= Downloader.maxversions)
+                break;
+            // Need to localize this variable to closure it correctly
+            var current = versions[i];
+            document.write(Downloader.table(versions[i], function (o) {
+                return o.version == current;
+            }));
+        }
+
+        function exposeversions (node) {
+            // Emit but do not render tables for remaining versions
+            var html = ''
+            for (i in versions) {
+                if (i < Downloader.maxversions)
+                    continue;
+                // Need to localize this variable to closure it correctly
+                var current = versions[i];
+                html += Downloader.table(versions[i], function (o) {
+                    return o.version == current;
+                });
+            }
+            node.innerHTML = html;
+        }
+
+        if (more) {
+            document.write('\
+    <div onclick="exposeversions(this);">\
+        <center id="more">[more versions]</center>\
+    </div>\
+    <br/>\
+');
+        }
+    </script>
+
+    <h5>Development Repositories</h5>
+    <dl>
+      <dt>Main</dt>
+      <dd>The main development repository of the Mercurial maintainer
+          <a href="http://mercurial.selenic.com/wiki/mpm">Matt Mackall</a>
+          can be found at <a href="http://selenic.com/hg">
+          http://selenic.com/hg</a>.</dd>
+      <dt>Crew</dt>
+      <dd>The development repository of the <a
+          href="http://mercurial.selenic.com/wiki/CrewRepository">
+          Mercurial Crew</a>
+          can be found at <a href="http://hg.intevation.org/mercurial/crew">
+          http://hg.intevation.org/mercurial/crew</a>.</dd>
+    </dl>
+
+    <h5>Requirements</h5>
+    <dl>
+      <dt>Python</dt>
+      <dd>Mercurial uses <a href="http://www.python.org">Python</a>
+          (versions <em>2.4</em> through <em>2.7</em>).  Most
+          ready-to-run Mercurial distributions include Python or use
+          the Python that comes with your operating system.  When
+          building from source you should confirm that an appropriate
+          Python version is available.</dd>
+    </dl>
+
+    <h5>Older Releases</h5>
+    <dl>
+      <dt>Python 2.3</dt>
+      <dd><a href="/release/mercurial-1.2.1.tar.gz">Mercurial 1.2.1</a>
+          is the last release to support Python 2.3.  Use this if you
+          need to run Mercurial on very old platforms and you cannot update
+          your Python installation.</dd>
+      <dt>Older source releases</dt>
+      <dd><a href="/release/">All previous source releases</a> are available
+          to download.</dd>
+    </dl>
+
+{% endblock %}
+{% block sidebar %}
+    <h3>Get started</h3>
+    <p>Mercurial is written in Python with platform independence in mind.
+    As a result, Mercurial is available on
+    <a href="http://www.microsoft.com/windows">Microsoft Windows</a>,
+    <a href="http://kernel.org">GNU/Linux</a>,
+    <a href="http://www.apple.com">Mac OS X</a>,
+    <a href="http://oracle.com/solaris">Solaris 11 Express</a> and others.
+    You can either download a binary package for the system of your choice or
+    build it from sources.</p>
+
+    <p>Windows users are likely to enjoy the <a href="http://tortoisehg.org">TortoiseHg</a> 
+    GUI the most. It integrates Mercurial directly into your explorer.</p>
+
+    <p>Packages for common Linux, BSD and Solaris distributions can be
+    installed from the system specific repositories</p>
+    <p>
+<pre>
+# Debian/Ubuntu
+$ apt-get install mercurial
+
+# Fedora
+$ yum install mercurial
+
+# Gentoo
+$ emerge mercurial
+
+# FreeBSD
+$ cd /usr/ports/devel/mercurial
+$ make install
+
+# Solaris 11 Express
+$ pkg install SUNWmercurial
+ </pre>
+ </p>
+{% endblock %}