Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +166 -125
templates/menu.html
CHANGED
@@ -1,13 +1,17 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Menu</title>
|
|
|
7 |
<!-- Bootstrap CSS -->
|
8 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
9 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
|
10 |
<style>
|
|
|
11 |
body {
|
12 |
font-family: Arial, sans-serif;
|
13 |
background-color: #fdf4e3;
|
@@ -19,6 +23,7 @@
|
|
19 |
|
20 |
.container {
|
21 |
max-width: 900px;
|
|
|
22 |
}
|
23 |
|
24 |
.menu-card {
|
@@ -29,6 +34,12 @@
|
|
29 |
margin: auto;
|
30 |
display: flex;
|
31 |
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
.menu-image {
|
@@ -37,11 +48,10 @@
|
|
37 |
object-fit: cover;
|
38 |
border-radius: 15px 15px 0 0;
|
39 |
cursor: pointer;
|
40 |
-
transition: transform 0.3s ease;
|
41 |
}
|
42 |
|
43 |
.menu-image:hover {
|
44 |
-
transform: scale(1.05);
|
45 |
}
|
46 |
|
47 |
.card-title {
|
@@ -76,7 +86,7 @@
|
|
76 |
box-shadow: none;
|
77 |
}
|
78 |
|
79 |
-
/* Video
|
80 |
.modal-content {
|
81 |
background-color: #fff;
|
82 |
border-radius: 10px;
|
@@ -96,145 +106,176 @@
|
|
96 |
font-size: 1.5rem;
|
97 |
font-weight: bold;
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
</style>
|
100 |
</head>
|
|
|
101 |
<body>
|
102 |
|
103 |
-
<div class="container
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
121 |
onclick="showItemDetails('Chicken Biryani', 15.99, 'chicken-biryani.jpg', 'Delicious spicy chicken biryani.', 'Biryani', 'Non-Veg')">
|
122 |
-
|
123 |
-
|
|
|
124 |
</div>
|
125 |
</div>
|
126 |
</div>
|
127 |
</div>
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
<
|
132 |
-
|
133 |
-
|
134 |
-
</
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
<div class="modal
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
</
|
151 |
</div>
|
152 |
</div>
|
153 |
</div>
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
<div class="modal
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
163 |
-
</div>
|
164 |
-
<div class="modal-body">
|
165 |
-
<!-- Item Image -->
|
166 |
-
<img id="modal-img" class="img-fluid rounded mb-3 d-block mx-auto" alt="Item Image" style="max-height: 200px; object-fit: cover;">
|
167 |
-
<!-- Item Name -->
|
168 |
-
<h5 id="modal-name" class="fw-bold text-center"></h5>
|
169 |
-
<!-- Item Price -->
|
170 |
-
<p id="modal-price" class="text-muted text-center"></p>
|
171 |
-
<!-- Item Description -->
|
172 |
-
<p id="modal-description" class="text-secondary"></p>
|
173 |
-
<!-- Add-ons -->
|
174 |
-
<div id="modal-addons" class="modal-addons mt-4">
|
175 |
-
<h6>Customization Options</h6>
|
176 |
-
<div id="addons-list" class="addons-container">Loading customization options...</div>
|
177 |
</div>
|
178 |
-
<div class="
|
179 |
-
|
180 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
</div>
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
|
|
|
|
191 |
</div>
|
192 |
-
<!-- Add to Cart Button -->
|
193 |
-
<button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
|
194 |
</div>
|
195 |
</div>
|
196 |
</div>
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
238 |
|
239 |
</body>
|
|
|
240 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
+
|
4 |
<head>
|
5 |
<meta charset="UTF-8">
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Biryani Hub Menu</title>
|
8 |
+
|
9 |
<!-- Bootstrap CSS -->
|
10 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
11 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
12 |
+
|
13 |
<style>
|
14 |
+
/* General Styles */
|
15 |
body {
|
16 |
font-family: Arial, sans-serif;
|
17 |
background-color: #fdf4e3;
|
|
|
23 |
|
24 |
.container {
|
25 |
max-width: 900px;
|
26 |
+
margin-top: 50px;
|
27 |
}
|
28 |
|
29 |
.menu-card {
|
|
|
34 |
margin: auto;
|
35 |
display: flex;
|
36 |
flex-direction: column;
|
37 |
+
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
38 |
+
}
|
39 |
+
|
40 |
+
.menu-card:hover {
|
41 |
+
transform: scale(1.05);
|
42 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
43 |
}
|
44 |
|
45 |
.menu-image {
|
|
|
48 |
object-fit: cover;
|
49 |
border-radius: 15px 15px 0 0;
|
50 |
cursor: pointer;
|
|
|
51 |
}
|
52 |
|
53 |
.menu-image:hover {
|
54 |
+
transform: scale(1.05);
|
55 |
}
|
56 |
|
57 |
.card-title {
|
|
|
86 |
box-shadow: none;
|
87 |
}
|
88 |
|
89 |
+
/* Modal Video Styles */
|
90 |
.modal-content {
|
91 |
background-color: #fff;
|
92 |
border-radius: 10px;
|
|
|
106 |
font-size: 1.5rem;
|
107 |
font-weight: bold;
|
108 |
}
|
109 |
+
|
110 |
+
/* Fixed View Cart Button */
|
111 |
+
.view-cart-container {
|
112 |
+
position: fixed;
|
113 |
+
bottom: 20px;
|
114 |
+
right: 20px;
|
115 |
+
z-index: 999;
|
116 |
+
}
|
117 |
+
|
118 |
+
.view-cart-button {
|
119 |
+
background-color: #0FAA39;
|
120 |
+
color: #fff;
|
121 |
+
padding: 10px 20px;
|
122 |
+
border-radius: 30px;
|
123 |
+
font-size: 1rem;
|
124 |
+
font-weight: bold;
|
125 |
+
text-decoration: none;
|
126 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
127 |
+
display: flex;
|
128 |
+
align-items: center;
|
129 |
+
justify-content: center;
|
130 |
+
}
|
131 |
+
|
132 |
+
.view-cart-button:hover {
|
133 |
+
background-color: #109835;
|
134 |
+
text-decoration: none;
|
135 |
+
}
|
136 |
+
|
137 |
</style>
|
138 |
</head>
|
139 |
+
|
140 |
<body>
|
141 |
|
142 |
+
<div class="container">
|
143 |
+
<h1 class="text-center">Biryani Hub Menu</h1>
|
144 |
+
|
145 |
+
<!-- Menu Item: Chicken Biryani -->
|
146 |
+
<h3 class="mt-4">Our Special Menu</h3>
|
147 |
+
<div class="row">
|
148 |
+
<!-- Item 1: Chicken Biryani -->
|
149 |
+
<div class="col-md-4 mb-4">
|
150 |
+
<div class="card menu-card">
|
151 |
+
<!-- Image for Chicken Biryani, clicking triggers video modal -->
|
152 |
+
<img src="chicken-biryani.jpg" class="card-img-top menu-image" alt="Chicken Biryani"
|
153 |
+
data-video-url="https://www.w3schools.com/html/movie.mp4" <!-- Replace with actual video URL -->
|
154 |
+
onclick="showVideo('https://www.w3schools.com/html/movie.mp4')">
|
155 |
+
<div class="card-body">
|
156 |
+
<h5 class="card-title">Chicken Biryani</h5>
|
157 |
+
<p class="card-text">$15.99</p>
|
158 |
+
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
|
|
159 |
onclick="showItemDetails('Chicken Biryani', 15.99, 'chicken-biryani.jpg', 'Delicious spicy chicken biryani.', 'Biryani', 'Non-Veg')">
|
160 |
+
Add to Cart
|
161 |
+
</button>
|
162 |
+
</div>
|
163 |
</div>
|
164 |
</div>
|
165 |
</div>
|
166 |
</div>
|
167 |
+
|
168 |
+
<!-- View Cart Button -->
|
169 |
+
<div class="view-cart-container">
|
170 |
+
<a href="/cart" class="view-cart-button">
|
171 |
+
View Cart
|
172 |
+
</a>
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<!-- Video Modal for Chicken Biryani -->
|
176 |
+
<div class="modal fade" id="videoModal" tabindex="-1" aria-labelledby="videoModalLabel" aria-hidden="true">
|
177 |
+
<div class="modal-dialog modal-dialog-centered">
|
178 |
+
<div class="modal-content">
|
179 |
+
<div class="modal-header">
|
180 |
+
<h5 class="modal-title" id="videoModalLabel">Chicken Biryani Video</h5>
|
181 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
182 |
+
</div>
|
183 |
+
<div class="modal-body">
|
184 |
+
<!-- Video Player -->
|
185 |
+
<video id="modal-video" class="embed-responsive-item" controls>
|
186 |
+
<source id="video-source" src="" type="video/mp4">
|
187 |
+
Your browser does not support the video tag.
|
188 |
+
</video>
|
189 |
+
</div>
|
190 |
</div>
|
191 |
</div>
|
192 |
</div>
|
193 |
+
|
194 |
+
<!-- Modal for Item Details -->
|
195 |
+
<div class="modal fade" id="itemModal" tabindex="-1" aria-labelledby="itemModalLabel" aria-hidden="true">
|
196 |
+
<div class="modal-dialog modal-dialog-centered">
|
197 |
+
<div class="modal-content">
|
198 |
+
<div class="modal-header">
|
199 |
+
<h5 class="modal-title" id="itemModalLabel">Item Details</h5>
|
200 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
</div>
|
202 |
+
<div class="modal-body">
|
203 |
+
<!-- Item Image -->
|
204 |
+
<img id="modal-img" class="img-fluid rounded mb-3 d-block mx-auto" alt="Item Image"
|
205 |
+
style="max-height: 200px; object-fit: cover;">
|
206 |
+
<!-- Item Name -->
|
207 |
+
<h5 id="modal-name" class="fw-bold text-center"></h5>
|
208 |
+
<!-- Item Price -->
|
209 |
+
<p id="modal-price" class="text-muted text-center"></p>
|
210 |
+
<!-- Item Description -->
|
211 |
+
<p id="modal-description" class="text-secondary"></p>
|
212 |
+
<!-- Add-ons -->
|
213 |
+
<div id="modal-addons" class="modal-addons mt-4">
|
214 |
+
<h6>Customization Options</h6>
|
215 |
+
<div id="addons-list" class="addons-container">Loading customization options...</div>
|
216 |
+
</div>
|
217 |
+
<div class="mt-4">
|
218 |
+
<h6>Custom Request</h6>
|
219 |
+
<textarea id="modal-instructions" class="form-control" placeholder="Enter any special instructions here..."></textarea>
|
220 |
+
</div>
|
221 |
+
<span id="modal-section" data-section="" data-category="" style="display: none;"></span>
|
222 |
</div>
|
223 |
+
<!-- Quantity Controls and Add to Cart Button -->
|
224 |
+
<div class="modal-footer d-flex align-items-center justify-content-between">
|
225 |
+
<!-- Quantity Controls -->
|
226 |
+
<div class="d-flex align-items-center gap-2">
|
227 |
+
<button type="button" class="btn btn-outline-secondary" id="decreaseQuantity">-</button>
|
228 |
+
<input type="text" class="form-control text-center" id="quantityInput" value="1" readonly
|
229 |
+
style="width: 50px;" />
|
230 |
+
<button type="button" class="btn btn-outline-secondary" id="increaseQuantity">+</button>
|
231 |
+
</div>
|
232 |
+
<!-- Add to Cart Button -->
|
233 |
+
<button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
|
234 |
</div>
|
|
|
|
|
235 |
</div>
|
236 |
</div>
|
237 |
</div>
|
238 |
+
|
239 |
+
<!-- JavaScript for Handling Video Display on Image Click -->
|
240 |
+
<script>
|
241 |
+
function showVideo(videoUrl) {
|
242 |
+
const videoElement = document.getElementById('modal-video');
|
243 |
+
const videoSource = document.getElementById('video-source');
|
244 |
+
videoSource.src = videoUrl;
|
245 |
+
videoElement.load(); // Reload the video element to apply the new source
|
246 |
+
const videoModal = new bootstrap.Modal(document.getElementById('videoModal'));
|
247 |
+
videoModal.show();
|
248 |
+
}
|
249 |
+
|
250 |
+
// Show item details in the modal
|
251 |
+
function showItemDetails(name, price, image, description, section, selectedCategory) {
|
252 |
+
document.getElementById('modal-name').innerText = name;
|
253 |
+
document.getElementById('modal-price').innerText = `$${price}`;
|
254 |
+
document.getElementById('modal-img').src = image || '/static/placeholder.jpg';
|
255 |
+
document.getElementById('modal-description').innerText = description || 'No description available.';
|
256 |
+
document.getElementById('addons-list').innerHTML = 'Loading customization options...';
|
257 |
+
}
|
258 |
+
|
259 |
+
// Handle adding item to cart from the modal
|
260 |
+
function addToCartFromModal() {
|
261 |
+
const itemName = document.getElementById('modal-name').innerText;
|
262 |
+
const itemPrice = parseFloat(document.getElementById('modal-price').innerText.replace('$', ''));
|
263 |
+
const itemImage = document.getElementById('modal-img').src;
|
264 |
+
const quantity = parseInt(document.getElementById('quantityInput').value);
|
265 |
+
|
266 |
+
// Add to cart logic here
|
267 |
+
console.log(`Adding ${itemName} to cart with quantity ${quantity} and price $${itemPrice}`);
|
268 |
+
|
269 |
+
// Close the modal after adding to cart
|
270 |
+
const modal = document.getElementById('itemModal');
|
271 |
+
const modalInstance = bootstrap.Modal.getInstance(modal);
|
272 |
+
modalInstance.hide();
|
273 |
+
}
|
274 |
+
</script>
|
275 |
+
|
276 |
+
<!-- Bootstrap JS -->
|
277 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
278 |
|
279 |
</body>
|
280 |
+
|
281 |
</html>
|