ciclos

commit 10cb94a656f335a2a5a41032696324aba74b69b1

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Improve products listing by using a boxed like interface

 src/templates/products.html | 30 +++++++++++++++---------------


diff --git a/src/templates/products.html b/src/templates/products.html
index 2cd5c78b755c5863d4e084ac1515095590bf6238..9d37de0b2fbe80e681d19e7b6a6eb18bf24f8af7 100644
--- a/src/templates/products.html
+++ b/src/templates/products.html
@@ -1,23 +1,23 @@
 {% extends 'layout.html' %}
 
 {% block body %}
-  <section>
+  <section class="mb-5">
     <a href="{{ url_for('products.new') }}">Novo Produto</a>
   </section>
 
-  <table>
-    <thead>
-      <tr> 
-        <th>Título</th> 
-      </tr>
-    </thead>
-    <tbody>
-      {% for product in products %}
-        <tr>
-          <td>{{ product.title }}</td>
-        </tr>
-      {% endfor %}
-    </tbody>
-  </table>
+  {% for product in products %}
+    <div class="p-5 mb-5 box">
+      <div class="box box-header mb-5">
+        <h2>{{ product.title }}</h2>
+      </div>
+      <div>
+        <small>{{ product.group.name }} - {{ product.category.name }}</small>
+      </div>
+      <em class="white-space-pre">{{ product.description }}</em>
+      <div>
+        <strong> {{ product.price | as_currency }} </strong>
+      </div>
+    </div>
+  {% endfor %}
 
 {% endblock %}