Kaynağa Gözat

Updating github.html to display parsed user data

David Leonard 10 yıl önce
ebeveyn
işleme
61b9dc4f68

+ 33 - 3
hackathon_starter/hackathon/templates/hackathon/github.html

@@ -2,8 +2,38 @@
 <html>
 <body>
 	{% include 'hackathon/base.html' %}
-	{% for key in data %}
-		{{ key }}
-	{% endfor %}
+
+	<div class="col-lg-12">
+    <div class="table-responsive">
+        <table class="table table-bordered table-hover table-striped tablesorter">
+            <thead>
+            <tr>
+            <th class="header"> Username <i class="icon-sort"></i></th>
+            <th class="header"> Blog <i class="icon-sort"></i></th>
+            <th class="header"> Public Repos <i class="icon-sort"></i></th>
+            <th class="header"> Public Gists <i class="icon-sort"></i></th>
+            <th class="header"> Email <i class="icon-sort"></i></th>
+            <th class="header"> Followers <i class="icon-sort"></i></th>
+            <th class="header"> Following <i class="icon-sort"></i></th>
+            </tr>
+        </thead>
+        <tbody>
+
+        {% for key in data %}
+            <tr>
+                <td>{{ key.name }}</td>
+                <td>{{ key.blog }}</td>
+                <td>{{ key.public_repos }}</td>
+                <td>{{ key.public_gists }}</td>
+                <td>{{ key.email }}</td>
+                <td>{{ key.followers }}</td>
+                <td>{{ key.following }}</td>
+			</tr>
+        {% endfor %}
+
+        </tbody>
+        </table>
+    </div>
+</div>
 </body>
 </html>