lokesh341 commited on
Commit
9b87248
·
verified ·
1 Parent(s): 4ffc145

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +41 -138
templates/menu.html CHANGED
@@ -395,46 +395,42 @@
395
  width: 40px;
396
  }
397
  .item-details {
 
 
398
  background-color: #f8f9fa;
399
  border-radius: 8px;
400
- padding: 10px;
401
  margin: 10px 15px;
402
- display: none;
403
  }
404
  .item-details.show {
405
  display: block;
406
  }
407
  .item-details h6 {
408
- font-size: 0.9rem;
 
 
409
  font-weight: bold;
410
- margin-bottom: 5px;
411
- color: #333333;
412
  }
413
  .item-details p {
414
- font-size: 0.85rem;
415
- margin-bottom: 5px;
416
- color: #333;
417
- }
418
- .item-details .nutritional-info {
419
- display: grid;
420
- grid-template-columns: 1fr 1fr;
421
- gap: 10px;
422
- background-color: #e9ecef;
423
- padding: 10px;
424
- border-radius: 5px;
425
- font-size: 0.85rem;
426
  line-height: 1.5;
 
427
  }
428
  .toggle-details {
429
  cursor: pointer;
430
  color: #0FAA39;
431
  font-size: 0.9rem;
432
- margin-left: 15px;
433
- margin-bottom: 10px;
434
- display: inline-block;
 
 
435
  }
436
  .toggle-details:hover {
437
- text-decoration: underline;
 
438
  }
439
  .category-buttons {
440
  display: flex;
@@ -745,6 +741,20 @@
745
  font-size: 10px;
746
  margin-left: 5px;
747
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  }
749
  </style>
750
  </head>
@@ -854,7 +864,12 @@
854
  </div>
855
  {% if item.Section__c != 'Soft Drinks' %}
856
  <div class="toggle-details" data-item-name="{{ item.Name | default('Unnamed Item') }}">Show Details</div>
857
- <div class="item-details" id="details-{{ item.Name | default('unnamed-item') | replace(' ', '-') }}"></div>
 
 
 
 
 
858
  {% endif %}
859
  </div>
860
  </div>
@@ -968,99 +983,6 @@
968
  "Whole Wheat Flour", "Yogurt (Curd)"
969
  ];
970
 
971
- const menuItemDetails = {
972
- "Veg Manchurian": {
973
- ingredients: "Cauliflower, Onion, Ginger, Garlic, Soy Sauce, Cornflour, Green Chilies, Capsicum, Spring Onion",
974
- nutritionalInfo: { calories: 250, protein: 5, carbs: 35, fats: 12, fiber: 3, sugar: 2 },
975
- allergens: "Soy, Gluten"
976
- },
977
- "Veg Biryani": {
978
- ingredients: "Basmati Rice, Mixed Vegetables (Carrot, Peas, Potato, Cauliflower), Ginger, Garlic, Biryani Masala, Mint Leaves, Curd, Onion, Ghee",
979
- nutritionalInfo: { calories: 300, protein: 6, carbs: 50, fats: 12, fiber: 5, sugar: 3 },
980
- allergens: "Dairy"
981
- },
982
- "Sukka Gosht (Goat)": {
983
- ingredients: "Goat Meat, Ginger-Garlic Paste, Green Chilies, Onion, Tomatoes, Garam Masala, Coriander Powder, Cumin Powder, Fresh Coriander",
984
- nutritionalInfo: { calories: 450, protein: 35, carbs: 10, fats: 30, fiber: 2, sugar: 1 },
985
- allergens: "None"
986
- },
987
- "Samosa": {
988
- ingredients: "Potatoes, Peas, Onion, Ginger, Cumin Seeds, Garam Masala, Wheat Flour (for dough), Oil (for frying)",
989
- nutritionalInfo: { calories: 150, protein: 3, carbs: 25, fats: 7, fiber: 2, sugar: 1 },
990
- allergens: "Gluten"
991
- },
992
- "Roti": {
993
- ingredients: "Whole Wheat Flour, Water, Salt",
994
- nutritionalInfo: { calories: 150, protein: 4, carbs: 30, fats: 1, fiber: 3, sugar: 0 },
995
- allergens: "Gluten"
996
- },
997
- "Prawn Fry": {
998
- ingredients: "Prawns, Garlic, Ginger, Chili Powder, Coriander Powder, Cumin Powder, Lemon Juice, Oil",
999
- nutritionalInfo: { calories: 350, protein: 25, carbs: 10, fats: 20, fiber: 1, sugar: 1 },
1000
- allergens: "Shellfish"
1001
- },
1002
- "Paneer Butter Masala": {
1003
- ingredients: "Paneer, Butter, Cream, Tomato Puree, Onion, Ginger, Garlic, Garam Masala",
1004
- nutritionalInfo: { calories: 400, protein: 15, carbs: 20, fats: 25, fiber: 2, sugar: 3 },
1005
- allergens: "Dairy"
1006
- },
1007
- "Paneer Biryani": {
1008
- ingredients: "Paneer, Basmati Rice, Mixed Vegetables (Carrot, Peas, Potato), Onion, Tomatoes, Biryani Masala, Mint Leaves, Curd",
1009
- nutritionalInfo: { calories: 350, protein: 12, carbs: 55, fats: 15, fiber: 4, sugar: 3 },
1010
- allergens: "Dairy"
1011
- },
1012
- "Onion Pakoda": {
1013
- ingredients: "Onion, Chickpea Flour (Besan), Rice Flour, Green Chilies, Cumin Seeds, Ginger, Turmeric Powder, Oil (for frying)",
1014
- nutritionalInfo: { calories: 200, protein: 5, carbs: 30, fats: 8, fiber: 3, sugar: 2 },
1015
- allergens: "Gluten (if cross-contamination)"
1016
- },
1017
- "Mutton Biryani": {
1018
- ingredients: "Mutton, Basmati Rice, Onion, Tomatoes, Ginger-Garlic Paste, Biryani Masala, Mint Leaves, Yogurt, Ghee",
1019
- nutritionalInfo: { calories: 500, protein: 30, carbs: 50, fats: 25, fiber: 4, sugar: 3 },
1020
- allergens: "Dairy"
1021
- },
1022
- "Fish Curry": {
1023
- ingredients: "Fish (any firm fish like Salmon or King Fish), Onion, Tomato, Ginger-Garlic Paste, Curry Leaves, Coconut Milk, Tamarind, Mustard Seeds",
1024
- nutritionalInfo: { calories: 300, protein: 25, carbs: 10, fats: 20, fiber: 2, sugar: 1 },
1025
- allergens: "Fish"
1026
- },
1027
- "Fiery Mango Glaze Chicken": {
1028
- ingredients: "Chicken, Mango Puree, Chili Sauce, Soy Sauce, Honey, Garlic, Ginger, Lemon Juice",
1029
- nutritionalInfo: { calories: 350, protein: 30, carbs: 15, fats: 18, fiber: 1, sugar: 5 },
1030
- allergens: "Soy"
1031
- },
1032
- "Chilli Gobi": {
1033
- ingredients: "Cauliflower, Onion, Green Chilies, Soy Sauce, Cornflour, Garlic, Ginger, Cumin Powder",
1034
- nutritionalInfo: { calories: 250, protein: 6, carbs: 35, fats: 12, fiber: 3, sugar: 2 },
1035
- allergens: "Soy, Gluten"
1036
- },
1037
- "Chilli Chicken": {
1038
- ingredients: "Chicken, Bell Pepper, Onion, Green Chilies, Soy Sauce, Cornflour, Garlic, Ginger",
1039
- nutritionalInfo: { calories: 400, protein: 35, carbs: 20, fats: 18, fiber: 2, sugar: 2 },
1040
- allergens: "Soy, Gluten"
1041
- },
1042
- "Chicken Manchurian": {
1043
- ingredients: "Chicken, Onion, Garlic, Ginger, Soy Sauce, Cornflour, Green Chilies, Capsicum",
1044
- nutritionalInfo: { calories: 350, protein: 25, carbs: 20, fats: 18, fiber: 2, sugar: 2 },
1045
- allergens: "Soy, Gluten"
1046
- },
1047
- "Chicken Curry": {
1048
- ingredients: "Chicken, Onion, Tomatoes, Ginger-Garlic Paste, Garam Masala, Coconut Milk, Coriander Leaves",
1049
- nutritionalInfo: { calories: 350, protein: 28, carbs: 15, fats: 12, fiber: 4, sugar: 2 },
1050
- allergens: "None"
1051
- },
1052
- "Chicken Biryani": {
1053
- ingredients: "Chicken, Basmati Rice, Onion, Tomatoes, Ginger-Garlic Paste, Biryani Masala, Mint Leaves, Curd",
1054
- nutritionalInfo: { calories: 500, protein: 35, carbs: 60, fats: 20, fiber: 5, sugar: 3 },
1055
- allergens: "Dairy"
1056
- },
1057
- "Channa Masala": {
1058
- ingredients: "Chickpeas, Onion, Tomatoes, Ginger-Garlic Paste, Garam Masala, Coriander Powder, Cumin Seeds, Lemon Juice",
1059
- nutritionalInfo: { calories: 250, protein: 10, carbs: 45, fats: 5, fiber: 6, sugar: 2 },
1060
- allergens: "None"
1061
- }
1062
- };
1063
-
1064
  function addToCartLocalStorage(payload) {
1065
  let cart = JSON.parse(localStorage.getItem('cart')) || [];
1066
  const existingItem = cart.find(item =>
@@ -1213,29 +1135,10 @@
1213
  dropdownMenu.style.display = 'none';
1214
  });
1215
  });
 
 
 
1216
  const menuCards = document.querySelectorAll('.menu-card');
1217
- menuCards.forEach(card => {
1218
- const itemName = card.querySelector('.card-title').innerText;
1219
- const detailsDiv = card.querySelector('.item-details');
1220
- const detailsData = menuItemDetails[itemName];
1221
- if (detailsDiv && detailsData) {
1222
- detailsDiv.innerHTML = `
1223
- <h6>Ingredients</h6>
1224
- <p>${detailsData.ingredients}</p>
1225
- <h6>Nutritional Info</h6>
1226
- <div class="nutritional-info">
1227
- <span>Calories: ${detailsData.nutritionalInfo.calories} kcal</span>
1228
- <span>Carbs: ${detailsData.nutritionalInfo.carbs}g</span>
1229
- <span>Protein: ${detailsData.nutritionalInfo.protein}g</span>
1230
- <span>Fats: ${detailsData.nutritionalInfo.fats}g</span>
1231
- </div>
1232
- <h6>Allergens</h6>
1233
- <p>${detailsData.allergens}</p>
1234
- `;
1235
- } else if (detailsDiv) {
1236
- detailsDiv.innerHTML = '<p>No details available for this item.</p>';
1237
- }
1238
- });
1239
  const menuVideos = document.querySelectorAll('.menu-video');
1240
  const cardObserver = new IntersectionObserver((entries, observer) => {
1241
  entries.forEach(entry => {
@@ -1639,4 +1542,4 @@
1639
  }
1640
  </script>
1641
  </body>
1642
- </html>
 
395
  width: 40px;
396
  }
397
  .item-details {
398
+ display: none;
399
+ padding: 15px;
400
  background-color: #f8f9fa;
401
  border-radius: 8px;
402
+ margin-top: 10px;
403
  margin: 10px 15px;
404
+ box-shadow: 0 2px 5px rgba(0,0,0,0.1);
405
  }
406
  .item-details.show {
407
  display: block;
408
  }
409
  .item-details h6 {
410
+ color: #0FAA39;
411
+ margin-bottom: 10px;
412
+ font-size: 1.1rem;
413
  font-weight: bold;
 
 
414
  }
415
  .item-details p {
416
+ margin-bottom: 15px;
417
+ color: #555;
 
 
 
 
 
 
 
 
 
 
418
  line-height: 1.5;
419
+ font-size: 0.9rem;
420
  }
421
  .toggle-details {
422
  cursor: pointer;
423
  color: #0FAA39;
424
  font-size: 0.9rem;
425
+ text-align: center;
426
+ padding: 10px;
427
+ background-color: #e9ecef;
428
+ border-radius: 0 0 8px 8px;
429
+ transition: background-color 0.3s ease;
430
  }
431
  .toggle-details:hover {
432
+ background-color: #dee2e6;
433
+ text-decoration: none;
434
  }
435
  .category-buttons {
436
  display: flex;
 
741
  font-size: 10px;
742
  margin-left: 5px;
743
  }
744
+ .item-details {
745
+ padding: 10px;
746
+ margin: 5px 10px;
747
+ }
748
+ .item-details h6 {
749
+ font-size: 0.95rem;
750
+ }
751
+ .item-details p {
752
+ font-size: 0.8rem;
753
+ }
754
+ .toggle-details {
755
+ font-size: 0.8rem;
756
+ padding: 8px;
757
+ }
758
  }
759
  </style>
760
  </head>
 
864
  </div>
865
  {% if item.Section__c != 'Soft Drinks' %}
866
  <div class="toggle-details" data-item-name="{{ item.Name | default('Unnamed Item') }}">Show Details</div>
867
+ <div class="item-details" id="details-{{ item.Name | default('unnamed-item') | replace(' ', '-') }}">
868
+ <h6>Ingredients</h6>
869
+ <p>{{ item.Ingredients__c | default('Not specified') }}</p>
870
+ <h6>Description</h6>
871
+ <p>{{ item.Description__c | default('No description available') }}</p>
872
+ </div>
873
  {% endif %}
874
  </div>
875
  </div>
 
983
  "Whole Wheat Flour", "Yogurt (Curd)"
984
  ];
985
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
986
  function addToCartLocalStorage(payload) {
987
  let cart = JSON.parse(localStorage.getItem('cart')) || [];
988
  const existingItem = cart.find(item =>
 
1135
  dropdownMenu.style.display = 'none';
1136
  });
1137
  });
1138
+
1139
+ // Removed static details population since we're using Salesforce data directly
1140
+
1141
  const menuCards = document.querySelectorAll('.menu-card');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1142
  const menuVideos = document.querySelectorAll('.menu-video');
1143
  const cardObserver = new IntersectionObserver((entries, observer) => {
1144
  entries.forEach(entry => {
 
1542
  }
1543
  </script>
1544
  </body>
1545
+ </html>