Commits

php committed 4a52186

Add a first version of the sidebar

  • Participants
  • Parent commits d662cba

Comments (0)

Files changed (3)

File static/javascript/download.js

+function os_detection() {
+    var OSName="Source";
+    if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
+    if (navigator.appVersion.indexOf("Mac")!=-1) OSName="Mac OS X";
+    if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
+    if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
+
+    document.write(OSName);
+}
+

File templates/base.html

         <link href="/css/styles.css" type="text/css" rel="stylesheet">
         <script type="text/javascript" src="/javascript/typeface.js"></script>
         <script type="text/javascript" src="/javascript/optimer_regular.typeface.js"></script>
+        <script type="text/javascript" src="/javascript/download.js"></script>
         <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">
 
         <title>Mercurial SCM</title>
                     </div>
                     <div class="col">
                         {% block sidebar %}
-                            No sidebar on this page yet.
+                        <a class="download typeface-js" href="/downloads">
+                                    <strong>Download now</strong>
+                                    Mercurial <em>1.3.1</em>
+                                    <span><script language="javascript">os_detection();</script></span>
+                        </a>
+                        <dl>
+                            <dt class="typeface-js">Requirements</dt>
+                            <dd>Python 2.4 (<a href="http://www.python.org">get python</a>)</dd>
+                            <!--2.4 is necessary for TortoiseHG, Mercurial only needs 2.3-->
+
+                            <dt>Another OS?<br><em>Get mercurial for:</em></dt>
+                            <dd><a href="/downloads">Mac OS X</a></dd>
+                            <dd><a href="/downloads">Windows</a></dd>
+                            <dd><a href="/downloads">other</a></dd>
+                        </dl>
                         {% endblock %}
                     </div>
                 </div>

File templates/frontpage.html

         <h2>Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface.</h2>
     </div>
     <div class="col">                   
-        {# TODO: download button #}
+        {% block sidebar %}
+         {{ super() }}
+        {% endblock %}
     </div>
 </div>