From 394826e40b930053dbc92ef0933dbe04c74ce11a Mon Sep 17 00:00:00 2001
From: b4-sharp <Bradley2.Sharp@live.uwe.ac.uk>
Date: Sat, 15 Apr 2023 20:42:57 +0100
Subject: [PATCH] Bootstrap basket

---
 store/templates/basket.html    | 100 +++++++++++----------------------
 store/templates/item_page.html |   2 -
 2 files changed, 34 insertions(+), 68 deletions(-)

diff --git a/store/templates/basket.html b/store/templates/basket.html
index 0b13036..6c916a8 100644
--- a/store/templates/basket.html
+++ b/store/templates/basket.html
@@ -1,73 +1,41 @@
-
-
 {% extends "base.html" %}
 
 {% block content %}
+<div class="container">
     <h1>Basket</h1>
-    <style>        
-        table {
-            border-collapse: collapse;
-            width: 100%;
-        }
-        
-        th, td {
-            text-align: left;
-            padding: 8px;
-            border-bottom: 1px solid #ddd;
-        }
-        
-        th {
-            background-color: #000000;
-            color: white;
-        }
-        
-        .remove-button {
-            background-color: #f44336;
-            color: white;
-            border: none;
-            padding: 8px 16px;
-            text-align: center;
-            text-decoration: none;
-            display: inline-block;
-            font-size: 16px;
-            margin: 4px 2px;
-            cursor: pointer;
-        }
-    </style>
-    
     {% if items %}
-        <table>
-            <thead>
-                <tr>
-                    <th>Item description</th>
-                    <th>Item price</th>
-                    <th></th>
-                </tr>
-            </thead>
-            <tbody>
-                {% for item in items %}
-                    <tr>
-                        <td>{{ item['description'] }}</td>
-                        <td>£{{ item['price'] }}</td>
-                        <td>
-                            <form method="POST" action="/remove_item">
-                                <input type="hidden" name="item" value="{{ item['id'] }}">
-                                <input type="submit" value="Remove">
-                            </form>
-                        </td>
-                    </tr>
-                {% endfor %}
-            </tbody>
-            <tfoot>
-                <tr>
-                    <td>Total price:</td>
-                    <td>£{{ total_price }}</td>
-                    <td></td>
-                </tr>
-            </tfoot>
-        </table>
+    <table class="table">
+        <thead class="text-light" style="background-color: #000000">
+            <tr>
+                <th>Item description</th>
+                <th>Item price</th>
+                <th></th>
+            </tr>
+        </thead>
+        <tbody>
+            {% for item in items %}
+            <tr>
+                <td>{{ item['description'] }}</td>
+                <td>£{{ item['price'] }}</td>
+                <td>
+                    <form method="POST" action="/remove_item">
+                        <input type="hidden" name="item" value="{{ item['id'] }}">
+                        <input type="submit" value="Remove">
+                    </form>
+                </td>
+            </tr>
+            {% endfor %}
+        </tbody>
+        <tfoot style="background-color: #f2f2f2">
+            <tr>
+                <td>Total price:</td>
+                <td>£{{ total_price }}</td>
+                <td></td>
+            </tr>
+        </tfoot>
+    </table>
     {% else %}
-        <p>Your basket is empty.</p>
+    <p>Your basket is empty.</p>
     {% endif %}
-    
-{% endblock %}
+</div>
+{% endblock %}
\ No newline at end of file
diff --git a/store/templates/item_page.html b/store/templates/item_page.html
index d6fb4c7..7e789fd 100644
--- a/store/templates/item_page.html
+++ b/store/templates/item_page.html
@@ -33,8 +33,6 @@
             {% endfor %}
         </tbody>
     </table>
-    {% else %}
-    <p>Item set is empty.</p>
     {% endif %}
 </div>
 {% endblock %}
\ No newline at end of file
-- 
GitLab