Subbu1304 commited on
Commit
a3a931a
·
verified ·
1 Parent(s): 5487fa6

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +109 -4
templates/menu.html CHANGED
@@ -6,7 +6,7 @@
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
- <style>
10
  /* avthar */
11
  .avatar-dropdown-container {
12
  position: relative;
@@ -239,9 +239,114 @@
239
  margin-left: 10px;
240
  }
241
 
242
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  </head>
244
- <body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
 
246
  <div class="fixed-top-bar">
247
  <!-- Removed Reward Points and Referral Code -->
@@ -602,5 +707,5 @@
602
 
603
  <!-- Bootstrap JS -->
604
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
605
- </body>
606
  </html>
 
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
+ <!-- <style>
10
  /* avthar */
11
  .avatar-dropdown-container {
12
  position: relative;
 
239
  margin-left: 10px;
240
  }
241
 
242
+ </style> -->
243
+ <style>
244
+ /* Menu item images and card styling */
245
+ .menu-card {
246
+ max-width: 100%;
247
+ border-radius: 15px;
248
+ overflow: hidden;
249
+ background-color: #fff;
250
+ margin: auto;
251
+ }
252
+
253
+ .menu-image {
254
+ height: 200px;
255
+ width: 100%;
256
+ object-fit: cover;
257
+ border-radius: 15px 15px 0 0;
258
+ }
259
+
260
+ .card-body {
261
+ padding: 15px;
262
+ }
263
+
264
+ /* Responsive grid for 3 columns */
265
+ @media (min-width: 768px) {
266
+ .menu-card {
267
+ max-width: 100%;
268
+ }
269
+ .col-md-4 {
270
+ flex: 0 0 33.3333%; /* Make each card take up 1/3 of the row */
271
+ max-width: 33.3333%;
272
+ }
273
+ }
274
+
275
+ /* Adjusting the appearance of the category and section headers */
276
+ h3 {
277
+ margin-top: 20px;
278
+ font-size: 1.2rem;
279
+ font-weight: bold;
280
+ }
281
+
282
+ </style>
283
  </head>
284
+
285
+ <div class="container mt-4">
286
+ <h1 class="text-center">Menu</h1>
287
+
288
+ <!-- Category Filter -->
289
+ <form method="get" action="/menu" class="text-center mb-4">
290
+ <label for="category" class="form-label fw-bold">Filter by Category:</label>
291
+ <select id="category" name="category" class="form-select" onchange="this.form.submit()">
292
+ {% for category in categories %}
293
+ <option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>
294
+ {{ category }}
295
+ </option>
296
+ {% endfor %}
297
+ <option value="Customized Dish" {% if selected_category == "Customized Dish" %}selected{% endif %}>
298
+ Customized Dish
299
+ </option>
300
+ </select>
301
+ </form>
302
+
303
+ {% if selected_category == "Customized Dish" %}
304
+ <!-- Customized Dish Form -->
305
+ <div id="custom-dish-form" class="mt-4">
306
+ <h3>Create Your Custom Dish</h3>
307
+ <form method="POST" action="/generate_custom_dish">
308
+ <div class="mb-3">
309
+ <label for="custom-dish-name" class="form-label">Dish Name</label>
310
+ <input type="text" class="form-control" id="custom-dish-name" name="name" required>
311
+ </div>
312
+ <div class="mb-3">
313
+ <label for="custom-dish-description" class="form-label">Dish Description</label>
314
+ <textarea class="form-control" id="custom-dish-description" name="description" required></textarea>
315
+ </div>
316
+ <button type="submit" class="btn btn-primary">Submit</button>
317
+ </form>
318
+ </div>
319
+ {% else %}
320
+ <!-- Menu Items in 3 Columns -->
321
+ <div class="container mt-4">
322
+ <h1 class="text-center">Menu</h1>
323
+ <div class="row">
324
+ {% for section, items in ordered_menu.items() %}
325
+ <h3 class="col-12">{{ section }}</h3>
326
+ <div class="row">
327
+ {% for item in items %}
328
+ <div class="col-md-4 mb-4">
329
+ <div class="card menu-card">
330
+ <img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
331
+ <div class="card-body">
332
+ <h5 class="card-title">{{ item.Name }}</h5>
333
+ <p class="card-text">${{ item.Price__c }}</p>
334
+ <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
335
+ onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{ item.Section__c }}','{{ selected_category }}')">
336
+ Add +
337
+ </button>
338
+ </div>
339
+ </div>
340
+ </div>
341
+ {% endfor %}
342
+ </div>
343
+ {% endfor %}
344
+ </div>
345
+ </div>
346
+ {% endif %}
347
+ </div>
348
+
349
+ <!-- <body>
350
 
351
  <div class="fixed-top-bar">
352
  <!-- Removed Reward Points and Referral Code -->
 
707
 
708
  <!-- Bootstrap JS -->
709
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
710
+ </body> -->
711
  </html>