Update templates/menu_page.html
Browse files- templates/menu_page.html +95 -26
templates/menu_page.html
CHANGED
@@ -3,38 +3,107 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Menu</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
</head>
|
8 |
<body>
|
9 |
-
|
10 |
-
<div
|
|
|
|
|
11 |
{% for item in menu_items %}
|
12 |
-
|
13 |
-
|
14 |
-
<
|
15 |
-
<p>Ingredients
|
16 |
-
<p>Category
|
17 |
-
<
|
18 |
</div>
|
|
|
|
|
19 |
{% endfor %}
|
20 |
</div>
|
21 |
|
22 |
-
<script>
|
23 |
-
function orderItem(itemName) {
|
24 |
-
let quantity = prompt("How many would you like to order?");
|
25 |
-
fetch("/order", {
|
26 |
-
method: "POST",
|
27 |
-
headers: {
|
28 |
-
"Content-Type": "application/json"
|
29 |
-
},
|
30 |
-
body: JSON.stringify({ "item_name": itemName, "quantity": quantity })
|
31 |
-
})
|
32 |
-
.then(response => response.json())
|
33 |
-
.then(data => {
|
34 |
-
alert(data.message);
|
35 |
-
})
|
36 |
-
.catch(error => console.error("Error placing order:", error));
|
37 |
-
}
|
38 |
-
</script>
|
39 |
</body>
|
40 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Menu - Biryani Hub</title>
|
7 |
+
<style>
|
8 |
+
/* General Body Styling */
|
9 |
+
body {
|
10 |
+
font-family: Arial, sans-serif;
|
11 |
+
background-color: #f8f8f8;
|
12 |
+
margin: 0;
|
13 |
+
padding: 0;
|
14 |
+
}
|
15 |
+
|
16 |
+
/* Container for the menu */
|
17 |
+
.menu-container {
|
18 |
+
max-width: 1200px;
|
19 |
+
margin: 0 auto;
|
20 |
+
padding: 20px;
|
21 |
+
background-color: #fff;
|
22 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
23 |
+
border-radius: 8px;
|
24 |
+
margin-top: 50px;
|
25 |
+
}
|
26 |
+
|
27 |
+
/* Heading Style */
|
28 |
+
h1 {
|
29 |
+
text-align: center;
|
30 |
+
font-size: 2.5rem;
|
31 |
+
color: #333;
|
32 |
+
margin-bottom: 30px;
|
33 |
+
}
|
34 |
+
|
35 |
+
/* Menu Item Styles */
|
36 |
+
.menu-item {
|
37 |
+
border-bottom: 1px solid #eee;
|
38 |
+
padding: 15px 0;
|
39 |
+
display: flex;
|
40 |
+
justify-content: space-between;
|
41 |
+
align-items: center;
|
42 |
+
}
|
43 |
+
|
44 |
+
.menu-item:last-child {
|
45 |
+
border-bottom: none;
|
46 |
+
}
|
47 |
+
|
48 |
+
.menu-item .details {
|
49 |
+
flex-grow: 1;
|
50 |
+
}
|
51 |
+
|
52 |
+
.menu-item .details h3 {
|
53 |
+
margin: 0;
|
54 |
+
font-size: 1.6rem;
|
55 |
+
color: #333;
|
56 |
+
}
|
57 |
+
|
58 |
+
.menu-item .details p {
|
59 |
+
margin: 5px 0;
|
60 |
+
color: #666;
|
61 |
+
}
|
62 |
+
|
63 |
+
.menu-item .details .price {
|
64 |
+
font-weight: bold;
|
65 |
+
color: #e91e63;
|
66 |
+
}
|
67 |
+
|
68 |
+
/* Order Button Style */
|
69 |
+
.order-btn {
|
70 |
+
padding: 10px 20px;
|
71 |
+
background-color: #4CAF50;
|
72 |
+
color: white;
|
73 |
+
border: none;
|
74 |
+
border-radius: 5px;
|
75 |
+
cursor: pointer;
|
76 |
+
font-size: 1rem;
|
77 |
+
transition: background-color 0.3s ease;
|
78 |
+
}
|
79 |
+
|
80 |
+
.order-btn:hover {
|
81 |
+
background-color: #45a049;
|
82 |
+
}
|
83 |
+
|
84 |
+
/* Add space between items */
|
85 |
+
.menu-item:not(:last-child) {
|
86 |
+
margin-bottom: 20px;
|
87 |
+
}
|
88 |
+
</style>
|
89 |
</head>
|
90 |
<body>
|
91 |
+
|
92 |
+
<div class="menu-container">
|
93 |
+
<h1>Welcome to the Menu</h1>
|
94 |
+
|
95 |
{% for item in menu_items %}
|
96 |
+
<div class="menu-item">
|
97 |
+
<div class="details">
|
98 |
+
<h3>{{ item.name }}</h3>
|
99 |
+
<p><strong>Ingredients:</strong> {{ item.ingredients }}</p>
|
100 |
+
<p><strong>Category:</strong> {{ item.category }}</p>
|
101 |
+
<p class="price">Price: ${{ item.price }}</p>
|
102 |
</div>
|
103 |
+
<button class="order-btn">Order</button>
|
104 |
+
</div>
|
105 |
{% endfor %}
|
106 |
</div>
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
</body>
|
109 |
</html>
|