changeset 257:cebed91e780d

Add a sample of passing the download list with jinja.
author Steve Losh <steve@stevelosh.com>
date Sat, 03 Oct 2009 21:53:01 -0400
parents d662cba2afb1
children 37c381bc813d
files templates/base.html templates/frontpage.html
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/templates/base.html	Thu Sep 24 18:00:24 2009 -0400
+++ b/templates/base.html	Sat Oct 03 21:53:01 2009 -0400
@@ -1,3 +1,5 @@
+{% set downloads = {'1.3.1': {'windows': 'linkwin', 'os.x': 'linkosx'}} %}
+
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
 <html>
--- a/templates/frontpage.html	Thu Sep 24 18:00:24 2009 -0400
+++ b/templates/frontpage.html	Sat Oct 03 21:53:01 2009 -0400
@@ -34,6 +34,17 @@
         </ol>
     </div>
     <div class="col">
+        <h3>Download</h3>
+        {% for version in downloads %}
+            <h4><strong>{{ version }}</strong></h4>
+            <ul>
+                {% for os in downloads[version] %}
+                    <li>{{ os }}: {{ downloads[version][os] }}</li>
+                {% endfor %}
+            </ul>
+            
+        {% endfor %}
+        
         <h3>Quick Start</h3>
 
         <p><em>Clone a project and create a patch</em>