Spaces:
Sleeping
Sleeping
Update templates/previous_orders.html
Browse files- templates/previous_orders.html +43 -47
templates/previous_orders.html
CHANGED
@@ -4,36 +4,28 @@
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>Previous Orders</title>
|
7 |
-
<!-- Bootstrap CSS -->
|
8 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
9 |
<style>
|
10 |
body {
|
11 |
font-family: 'Arial', sans-serif;
|
12 |
-
background-color: #fdf4e3;
|
13 |
-
color: #333333;
|
14 |
-
margin: 0;
|
15 |
-
padding: 0;
|
16 |
-
display: flex;
|
17 |
-
flex-direction: column;
|
18 |
-
min-height: 100vh;
|
19 |
}
|
20 |
.order-container {
|
21 |
max-width: 768px;
|
22 |
margin: 40px auto;
|
23 |
padding: 20px;
|
24 |
-
background-color: #ffffff;
|
25 |
border-radius: 15px;
|
26 |
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
|
27 |
-
border: 1px solid #ffe5b4; /* Light orange border */
|
28 |
-
flex-grow: 1;
|
29 |
}
|
30 |
.cart-item {
|
31 |
display: flex;
|
32 |
align-items: center;
|
33 |
justify-content: space-between;
|
34 |
-
background-color: #fffcf5;
|
35 |
border-radius: 8px;
|
36 |
-
border: 1px solid #ffe5b4;
|
37 |
padding: 10px;
|
38 |
margin-bottom: 10px;
|
39 |
}
|
@@ -42,7 +34,7 @@
|
|
42 |
height: 70px;
|
43 |
object-fit: cover;
|
44 |
border-radius: 5px;
|
45 |
-
border: 1px solid #ffcc80;
|
46 |
}
|
47 |
.cart-item-details {
|
48 |
flex: 1;
|
@@ -51,7 +43,7 @@
|
|
51 |
.cart-item-title {
|
52 |
font-size: 1.2rem;
|
53 |
font-weight: bold;
|
54 |
-
color: #c04e01;
|
55 |
}
|
56 |
.cart-item-addons,
|
57 |
.cart-item-instructions {
|
@@ -62,11 +54,16 @@
|
|
62 |
text-align: right;
|
63 |
margin-top: 15px;
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
65 |
.back-to-menu {
|
66 |
display: block;
|
67 |
margin: 30px auto 10px auto;
|
68 |
padding: 10px 20px;
|
69 |
-
background-color: #ff5722;
|
70 |
color: #ffffff;
|
71 |
border: none;
|
72 |
border-radius: 25px;
|
@@ -75,12 +72,13 @@
|
|
75 |
text-align: center;
|
76 |
text-decoration: none;
|
77 |
width: 100%;
|
78 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
79 |
-
transition: background-color 0.3s ease;
|
80 |
}
|
81 |
-
|
82 |
-
background-color: #
|
83 |
-
|
|
|
|
|
|
|
84 |
}
|
85 |
</style>
|
86 |
</head>
|
@@ -89,35 +87,29 @@
|
|
89 |
<div class="order-container">
|
90 |
<h4 class="mb-4 text-center">Your Previous Orders</h4>
|
91 |
|
92 |
-
{% if
|
93 |
-
{% for order in
|
94 |
-
<
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
<div class="cart-item-title">{{ item_parts[0].strip() }}</div> <!-- Item Name -->
|
107 |
-
<div class="cart-item-addons">
|
108 |
-
<small class="text-muted">Add-ons: {{ item_parts[1].strip().replace('Add-Ons:', '') }}</small>
|
109 |
</div>
|
110 |
-
|
111 |
-
|
|
|
|
|
112 |
</div>
|
113 |
</div>
|
114 |
-
|
115 |
-
|
116 |
-
<div class="cart-item-actions">
|
117 |
-
<strong>{{ item_parts[3].strip().replace('Price:', '') }}</strong>
|
118 |
-
</div>
|
119 |
-
</div>
|
120 |
-
{% endfor %}
|
121 |
{% endfor %}
|
122 |
{% else %}
|
123 |
<p class="text-center">No previous orders found.</p>
|
@@ -127,5 +119,9 @@
|
|
127 |
<a href="/menu" class="back-to-menu">Back to Menu</a>
|
128 |
</div>
|
129 |
</div>
|
|
|
|
|
|
|
|
|
130 |
</body>
|
131 |
</html>
|
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>Previous Orders</title>
|
|
|
7 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
8 |
<style>
|
9 |
body {
|
10 |
font-family: 'Arial', sans-serif;
|
11 |
+
background-color: #fdf4e3;
|
12 |
+
color: #333333;
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
.order-container {
|
15 |
max-width: 768px;
|
16 |
margin: 40px auto;
|
17 |
padding: 20px;
|
18 |
+
background-color: #ffffff;
|
19 |
border-radius: 15px;
|
20 |
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
|
|
|
|
|
21 |
}
|
22 |
.cart-item {
|
23 |
display: flex;
|
24 |
align-items: center;
|
25 |
justify-content: space-between;
|
26 |
+
background-color: #fffcf5;
|
27 |
border-radius: 8px;
|
28 |
+
border: 1px solid #ffe5b4;
|
29 |
padding: 10px;
|
30 |
margin-bottom: 10px;
|
31 |
}
|
|
|
34 |
height: 70px;
|
35 |
object-fit: cover;
|
36 |
border-radius: 5px;
|
37 |
+
border: 1px solid #ffcc80;
|
38 |
}
|
39 |
.cart-item-details {
|
40 |
flex: 1;
|
|
|
43 |
.cart-item-title {
|
44 |
font-size: 1.2rem;
|
45 |
font-weight: bold;
|
46 |
+
color: #c04e01;
|
47 |
}
|
48 |
.cart-item-addons,
|
49 |
.cart-item-instructions {
|
|
|
54 |
text-align: right;
|
55 |
margin-top: 15px;
|
56 |
}
|
57 |
+
.total-price {
|
58 |
+
font-size: 1.5rem;
|
59 |
+
font-weight: bold;
|
60 |
+
color: #2b9348;
|
61 |
+
}
|
62 |
.back-to-menu {
|
63 |
display: block;
|
64 |
margin: 30px auto 10px auto;
|
65 |
padding: 10px 20px;
|
66 |
+
background-color: #ff5722;
|
67 |
color: #ffffff;
|
68 |
border: none;
|
69 |
border-radius: 25px;
|
|
|
72 |
text-align: center;
|
73 |
text-decoration: none;
|
74 |
width: 100%;
|
|
|
|
|
75 |
}
|
76 |
+
footer {
|
77 |
+
background-color: #333333;
|
78 |
+
color: #ffffff;
|
79 |
+
text-align: center;
|
80 |
+
padding: 15px 10px;
|
81 |
+
margin-top: auto;
|
82 |
}
|
83 |
</style>
|
84 |
</head>
|
|
|
87 |
<div class="order-container">
|
88 |
<h4 class="mb-4 text-center">Your Previous Orders</h4>
|
89 |
|
90 |
+
{% if orders %}
|
91 |
+
{% for order in orders %}
|
92 |
+
<div class="order-items">
|
93 |
+
<h5 class="text-center">Order Date: {{ order.order_date }}</h5>
|
94 |
+
{% for item in order.items %}
|
95 |
+
<div class="cart-item">
|
96 |
+
<!-- Item Image -->
|
97 |
+
<img src="{{ item.image }}" alt="{{ item.name }}" onerror="this.src='/static/placeholder.jpg';">
|
98 |
+
|
99 |
+
<!-- Item Details -->
|
100 |
+
<div class="cart-item-details">
|
101 |
+
<div class="cart-item-title">{{ item.name }}</div>
|
102 |
+
<div class="cart-item-addons">Add-ons: {{ item.addons }}</div>
|
103 |
+
<div class="cart-item-instructions">Instructions: {{ item.instructions }}</div>
|
|
|
|
|
|
|
104 |
</div>
|
105 |
+
|
106 |
+
<!-- Price -->
|
107 |
+
<div class="cart-item-actions">
|
108 |
+
<strong>{{ item.price }}</strong>
|
109 |
</div>
|
110 |
</div>
|
111 |
+
{% endfor %}
|
112 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
113 |
{% endfor %}
|
114 |
{% else %}
|
115 |
<p class="text-center">No previous orders found.</p>
|
|
|
119 |
<a href="/menu" class="back-to-menu">Back to Menu</a>
|
120 |
</div>
|
121 |
</div>
|
122 |
+
|
123 |
+
<footer>
|
124 |
+
<p>Thank you for dining with us! <span>We look forward to serving you again.</span></p>
|
125 |
+
</footer>
|
126 |
</body>
|
127 |
</html>
|