Subbu1304 commited on
Commit
b31f0bb
·
verified ·
1 Parent(s): 690eb1e

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +61 -206
templates/menu.html CHANGED
@@ -16,8 +16,36 @@
16
  display: flex;
17
  flex-direction: column;
18
  }
19
- /* ################################################################### */
20
- .customize-btn {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  position: absolute;
22
  top: 50%;
23
  right: 0;
@@ -25,7 +53,6 @@
25
  z-index: 2;
26
  background: linear-gradient(92.29deg, rgba(63, 63, 63, 0.7) 4.75%, rgba(0, 0, 0, 0.7) 93.57%);
27
  color: #fff;
28
- font-weight:bold;
29
  border: none;
30
  padding: 4px 12px; /* Reduced padding for smaller height */
31
  border-radius: 5px 0px 0px 5px ;
@@ -38,63 +65,21 @@
38
  margin-left: 5px; /* Icon spacing */
39
  }
40
 
 
 
 
 
41
 
42
- /* ################################################################################################ */
43
 
44
 
45
- .addbutton .card-body {
46
- padding: 10px; /* Adjust as needed */
47
- }
48
 
49
- .addbutton .btn {
50
- margin-left: 10px; /* Adds some space between button and text */
51
- }
52
- .addbutton .btn {
53
- background: linear-gradient(135deg, #28a745, #006400); /* Gradient green */
54
- color: white; /* Make the text color white */
55
- border: none; /* Remove the border */
56
- padding: 8px 15px; /* Adjust padding */
57
- font-size: 16px; /* Adjust font size */
58
- border-radius: 5px; /* Optional: round the corners */
59
- transition: background 0.3s ease; /* Add transition effect for hover */
60
- }
61
 
62
- .addbutton .btn:hover {
63
- background: linear-gradient(135deg, #006400, #28a745); /* Reverse gradient for hover effect */
64
- }
65
 
66
 
67
 
68
 
69
 
70
 
71
- .container {
72
- max-width: 900px;
73
- }
74
- .menu-card {
75
- max-width: 350px;
76
- border-radius: 15px;
77
- overflow: hidden;
78
- background-color: #fff;
79
- margin: auto;
80
- display: flex;
81
- flex-direction: column;
82
- }
83
- .menu-image {
84
- height: 200px; /* Fixed height */
85
- width: 100%; /* Full width of the card */
86
- object-fit: fill; /* Ensure the image covers the area and maintains the aspect ratio */
87
- border-radius: 15px 15px 0 0; /* Rounded top corners */
88
- }
89
- .card-title {
90
- font-size: 1.2rem;
91
- font-weight: bold;
92
- margin: 10px 0;
93
- }
94
- .card-text {
95
- font-size: 1rem;
96
- color: #6c757d;
97
- }
98
  .btn-primary {
99
  font-size: 13px;
100
  font-weight: bold;
@@ -113,18 +98,12 @@
113
  border-color: #ffffff;
114
  box-shadow: none;
115
  }
116
-
117
-
118
- /* view-cart#### */
119
-
120
  .view-cart-container {
121
  position: fixed;
122
  bottom: 20px;
123
  right: 20px;
124
  z-index: 999;
125
  }
126
-
127
-
128
  .view-cart-button {
129
  background-color: #0FAA39; /* Updated View Cart button background color */
130
  color: #fff;
@@ -142,11 +121,6 @@
142
  background-color: #109835; /* Slightly darker shade for hover effect */
143
  text-decoration: none;
144
  }
145
-
146
- /* ######################### */
147
-
148
-
149
-
150
  .avatar-dropdown-container {
151
  position: relative;
152
  }
@@ -227,99 +201,21 @@ h1.text-center {
227
  padding-top: 0 !important; /* Removed padding */
228
  font-weight: semi-bold; /* Make the "Menu" text bold */
229
  }
230
- /* .fixed-top-bar {
231
  /* Remove the fixed positioning */
232
  position: relative; /* Change from fixed to relative */
233
  top: 0;
234
  left: 0;
235
  width: 100%;
236
  height: 54px;
237
- background: linear-gradient(135deg, #000000, #434343);
238
  color: white;
239
  padding: 15px;
240
  display: flex;
241
  justify-content: space-between;
242
  align-items: center; /* Vertically align items */
243
  z-index: 1000; /* Make sure it's still above other content */
244
- } */
245
- .fixed-top-bar {
246
- position: fixed;
247
- top: 0;
248
- left: 0;
249
- width: 100%;
250
- background-color: #fff; /* Background color for the top bar */
251
- display: flex;
252
- justify-content: space-between;
253
- align-items: center;
254
- padding: 10px 20px;
255
- z-index: 1000;
256
  }
257
-
258
- .logo-search-container {
259
- display: flex;
260
- align-items: center;
261
- justify-content: center;
262
- flex-grow: 1; /* Allow this section to take up available space */
263
- position: relative;
264
- }
265
-
266
- .logo {
267
- margin-right: 15px; /* Space between logo and search bar */
268
- }
269
-
270
- .logo-img {
271
- height: 40px; /* Adjust logo size */
272
- width: auto;
273
- }
274
-
275
-
276
-
277
- .search-bar-container {
278
- display: flex;
279
- align-items: center;
280
- width: 70%; /* Adjust the width as needed */
281
- max-width: 600px; /* Optional: limit the maximum width */
282
- }
283
-
284
- .search-bar-container input {
285
- width: 100%; /* Make the input field take up all available space */
286
- padding: 10px;
287
- font-size: 14px;
288
- border-radius: 25px; /* Round the edges of the input */
289
- border: 1px solid #ccc;
290
- }
291
-
292
- .search-icon {
293
- position: absolute;
294
- right: 15px;
295
- pointer-events: none;
296
- font-size: 16px;
297
- }
298
-
299
- .avatar-dropdown-container {
300
- display: flex;
301
- align-items: center;
302
- }
303
-
304
- .avatar-icon {
305
- width: 40px;
306
- height: 40px;
307
- background-color: #f0f0f0;
308
- border-radius: 50%;
309
- display: flex;
310
- justify-content: center;
311
- align-items: center;
312
- font-weight: bold;
313
- margin-left: 10px;
314
- }
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
  .search-bar-container {
324
  padding: 10px;
325
  position: absolute;
@@ -557,7 +453,6 @@ form-check-input addon-option{
557
  </div>
558
  </div>
559
 
560
-
561
  <!-- Category Filter with Custom Radio Buttons -->
562
  <form method="get" action="/menu" class="text-center mb-4">
563
  <label class="form-label fw-bold">Select a Category:</label>
@@ -578,7 +473,7 @@ form-check-input addon-option{
578
 
579
  <!-- Show menu items only when Customized Dish is not selected -->
580
  <div class="container mt-4">
581
- <!-- <h1 class="text-center">Menu</h1> -->
582
 
583
  <!-- Display text boxes for Customized Dish -->
584
  {% if selected_category == "Customized Dish" %}
@@ -603,45 +498,38 @@ form-check-input addon-option{
603
  <h3>{{ section }}</h3>
604
  <div class="row">
605
  {% for item in items %}
606
- <div class="col-md-4 mb-4">
607
  <div class="card menu-card">
608
-
609
- <img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';" "loading="lazy">
610
- <!-- Customize Button on Image -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
  <button class="btn customize-btn"
612
  data-bs-toggle="modal" data-bs-target="#itemModal"
613
  onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{ item.Section__c }}','{{ selected_category }}')">
614
  Customize <i class="bi bi-caret-right-fill"></i>
615
  </button>
616
-
617
-
618
-
619
- <!-- <div class="addbutton">
620
- <div class="card-body ">
621
- <h5 class="card-title">{{ item.Name }}</h5>
622
- <p class="card-text">${{ item.Price__c }}</p>
623
- </div>
624
- <div class="mt-10 mr-5 ">
625
- <button class="btn btn-primary ">Add</button>
626
- </div>
627
 
628
- </div> -->
629
- <div class="addbutton">
630
- <div class="card-body d-flex align-items-center justify-content-between">
631
- <div>
632
- <h5 class="card-title">{{ item.Name }}</h5>
633
- <p class="card-text">${{ item.Price__c }}</p>
634
- </div>
635
- <div>
636
- <button class="btn btn-primary"onclick="addToCart()">Add</button>
637
  </div>
638
- </div>
639
  </div>
640
-
641
-
642
-
643
- </div>
644
- </div>
645
  {% endfor %}
646
  </div>
647
  {% endfor %}
@@ -942,41 +830,8 @@ document.addEventListener('DOMContentLoaded', function () {
942
  });
943
  });
944
 
945
-
946
-
947
-
948
-
949
-
950
- // subbu
951
-
952
-
953
-
954
-
955
-
956
-
957
- function addToCart(itemName, customerEmail) {
958
- fetch(`/cart/add_item`, {
959
- method: "POST",
960
- headers: { "Content-Type": "application/json" },
961
- body: JSON.stringify({
962
- email: customerEmail,
963
- item_name: itemName.trim(), //Ensure the item name is trimmed
964
- quantity: 0 // DEFAULT QUANTITY PASSED HERE
965
- })
966
- })
967
- .then(response => response.json())
968
- .then(data => {
969
- if (data.success) {
970
- alert("Item added/updated successfully.");
971
- location.reload(); // Reload the page to update the cart
972
- } else {
973
- alert(data.error || "Failed to add item to cart.");
974
- }
975
- })
976
- .catch(err => console.error("Error adding item to cart:", err));
977
- }
978
 
979
- // subbu
980
  </script>
981
 
982
  <!-- Bootstrap JS -->
 
16
  display: flex;
17
  flex-direction: column;
18
  }
19
+ .container {
20
+ max-width: 900px;
21
+ }
22
+ .menu-card {
23
+ max-width: 350px;
24
+ border-radius: 15px;
25
+ overflow: hidden;
26
+ background-color: #fff;
27
+ margin: auto;
28
+ display: flex;
29
+ flex-direction: column;
30
+ }
31
+ .menu-image {
32
+ height: 200px; /* Fixed height */
33
+ width: 100%; /* Full width of the card */
34
+ object-fit: fill; /* Ensure the image covers the area and maintains the aspect ratio */
35
+ border-radius: 15px 15px 0 0; /* Rounded top corners */
36
+ }
37
+ .card-title {
38
+ font-size: 1.2rem;
39
+ font-weight: bold;
40
+ margin: 10px 0;
41
+ }
42
+ .card-text {
43
+ font-size: 1rem;
44
+ color: #6c757d;
45
+ }
46
+
47
+
48
+ .customize-btn {
49
  position: absolute;
50
  top: 50%;
51
  right: 0;
 
53
  z-index: 2;
54
  background: linear-gradient(92.29deg, rgba(63, 63, 63, 0.7) 4.75%, rgba(0, 0, 0, 0.7) 93.57%);
55
  color: #fff;
 
56
  border: none;
57
  padding: 4px 12px; /* Reduced padding for smaller height */
58
  border-radius: 5px 0px 0px 5px ;
 
65
  margin-left: 5px; /* Icon spacing */
66
  }
67
 
68
+ /* .customize-btn:hover {
69
+ background-color: #e08c00; /* Darker shade for hover effect */
70
+ transition: background-color 0.3s ease;
71
+ } *
72
 
 
73
 
74
 
 
 
 
75
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
 
 
 
77
 
78
 
79
 
80
 
81
 
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  .btn-primary {
84
  font-size: 13px;
85
  font-weight: bold;
 
98
  border-color: #ffffff;
99
  box-shadow: none;
100
  }
 
 
 
 
101
  .view-cart-container {
102
  position: fixed;
103
  bottom: 20px;
104
  right: 20px;
105
  z-index: 999;
106
  }
 
 
107
  .view-cart-button {
108
  background-color: #0FAA39; /* Updated View Cart button background color */
109
  color: #fff;
 
121
  background-color: #109835; /* Slightly darker shade for hover effect */
122
  text-decoration: none;
123
  }
 
 
 
 
 
124
  .avatar-dropdown-container {
125
  position: relative;
126
  }
 
201
  padding-top: 0 !important; /* Removed padding */
202
  font-weight: semi-bold; /* Make the "Menu" text bold */
203
  }
204
+ .fixed-top-bar {
205
  /* Remove the fixed positioning */
206
  position: relative; /* Change from fixed to relative */
207
  top: 0;
208
  left: 0;
209
  width: 100%;
210
  height: 54px;
211
+ background-color: #FF6B35;
212
  color: white;
213
  padding: 15px;
214
  display: flex;
215
  justify-content: space-between;
216
  align-items: center; /* Vertically align items */
217
  z-index: 1000; /* Make sure it's still above other content */
 
 
 
 
 
 
 
 
 
 
 
 
218
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  .search-bar-container {
220
  padding: 10px;
221
  position: absolute;
 
453
  </div>
454
  </div>
455
 
 
456
  <!-- Category Filter with Custom Radio Buttons -->
457
  <form method="get" action="/menu" class="text-center mb-4">
458
  <label class="form-label fw-bold">Select a Category:</label>
 
473
 
474
  <!-- Show menu items only when Customized Dish is not selected -->
475
  <div class="container mt-4">
476
+ <h1 class="text-center">Menu</h1>
477
 
478
  <!-- Display text boxes for Customized Dish -->
479
  {% if selected_category == "Customized Dish" %}
 
498
  <h3>{{ section }}</h3>
499
  <div class="row">
500
  {% for item in items %}
501
+ <!-- <div class="col-md-6 mb-4">
502
  <div class="card menu-card">
503
+ <img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';" "loading="lazy">
504
+ <div class="card-body">
505
+ <h5 class="card-title">{{ item.Name }}</h5>
506
+ <p class="card-text">${{ item.Price__c }}</p>
507
+ <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
508
+ onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{ item.Section__c }}','{{ selected_category }}')">
509
+ Add
510
+ </button>
511
+ </div>
512
+ </div>
513
+ </div> -->
514
+ <div class="col-md-4 mb-4">
515
+ <div class="card menu-card">
516
+ <img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}"
517
+ onerror="this.src='/static/placeholder.jpg';" loading="lazy">
518
+
519
+ <!-- Customize Button on Image -->
520
  <button class="btn customize-btn"
521
  data-bs-toggle="modal" data-bs-target="#itemModal"
522
  onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{ item.Section__c }}','{{ selected_category }}')">
523
  Customize <i class="bi bi-caret-right-fill"></i>
524
  </button>
 
 
 
 
 
 
 
 
 
 
 
525
 
526
+ <div class="card-body">
527
+ <h5 class="card-title">{{ item.Name }}</h5>
528
+ <p class="card-text">${{ item.Price__c }}</p>
529
+ </div>
530
+
 
 
 
 
531
  </div>
 
532
  </div>
 
 
 
 
 
533
  {% endfor %}
534
  </div>
535
  {% endfor %}
 
830
  });
831
  });
832
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
833
 
834
+
835
  </script>
836
 
837
  <!-- Bootstrap JS -->