nagasurendra commited on
Commit
9f251f9
·
verified ·
1 Parent(s): 89770e7

Update templates/reward_status.html

Browse files
Files changed (1) hide show
  1. templates/reward_status.html +9 -19
templates/reward_status.html CHANGED
@@ -71,12 +71,17 @@
71
  justify-content: space-between;
72
  padding-top: 10px;
73
  flex-wrap: wrap;
 
74
  }
75
  .ingredient {
76
  width: 48%;
77
  text-align: center;
78
  cursor: pointer;
79
  margin-top: 10px;
 
 
 
 
80
  }
81
  .ingredient img {
82
  width: 100%;
@@ -103,7 +108,7 @@
103
  margin: 5% auto;
104
  padding: 20px;
105
  border: 1px solid #888;
106
- width: 80%; /* Changed to 80% of screen width */
107
  border-radius: 8px;
108
  position: relative;
109
  }
@@ -135,7 +140,7 @@
135
  <p>Price: ${{ "%.2f"|format(item.price) }}</p>
136
  </div>
137
 
138
- <!-- Ingredients -->
139
  <div class="ingredient-card">
140
  {% if item.ingredients %}
141
  {% for ingredient in item.ingredients %}
@@ -148,19 +153,6 @@
148
  <p>No ingredients found for {{ item.name }}</p>
149
  {% endif %}
150
  </div>
151
-
152
- <!-- Debugging the items and ingredients in console -->
153
- <script>
154
- console.log("Rendering item: {{ item.name }}");
155
-
156
- {% if item.ingredients %}
157
- {% for ingredient in item.ingredients %}
158
- console.log("Ingredient: {{ ingredient.name }} - Image: {{ ingredient.image }}");
159
- {% endfor %}
160
- {% else %}
161
- console.log("No ingredients for {{ item.name }}");
162
- {% endif %}
163
- </script>
164
  {% endfor %}
165
  </div>
166
  </div>
@@ -186,7 +178,6 @@
186
  <script>
187
  // JavaScript for showing ingredient details in modal
188
  function showIngredientDetails(name, image, healthBenefits, funFacts) {
189
- console.log("Ingredient clicked:", name); // Debugging to check if the correct ingredient is clicked
190
  const healthBenefitsList = healthBenefits.split(',');
191
  const funFactsList = funFacts.split(',');
192
  document.getElementById("ingredientName").textContent = name;
@@ -210,14 +201,13 @@
210
  document.getElementById("ingredientModal").style.display = "none";
211
  }
212
 
213
- // Debugging: Check if items and ingredients exist on page load
214
  window.onload = function() {
215
  const items = document.querySelectorAll('.item-info');
216
  items.forEach(item => {
217
- console.log("Item:", item.querySelector('h3').innerText);
218
  const ingredients = item.nextElementSibling.querySelectorAll('.ingredient');
219
  ingredients.forEach(ingredient => {
220
- console.log("Ingredient Name:", ingredient.querySelector('p').innerText);
221
  });
222
  });
223
  }
 
71
  justify-content: space-between;
72
  padding-top: 10px;
73
  flex-wrap: wrap;
74
+ gap: 10px; /* Ensures ingredients are spaced out evenly */
75
  }
76
  .ingredient {
77
  width: 48%;
78
  text-align: center;
79
  cursor: pointer;
80
  margin-top: 10px;
81
+ transition: transform 0.3s ease; /* Added smooth hover effect */
82
+ }
83
+ .ingredient:hover {
84
+ transform: scale(1.05); /* Makes the ingredient slightly larger when hovered */
85
  }
86
  .ingredient img {
87
  width: 100%;
 
108
  margin: 5% auto;
109
  padding: 20px;
110
  border: 1px solid #888;
111
+ width: 80%; /* Adjust to 80% of screen width */
112
  border-radius: 8px;
113
  position: relative;
114
  }
 
140
  <p>Price: ${{ "%.2f"|format(item.price) }}</p>
141
  </div>
142
 
143
+ <!-- Ingredients Section -->
144
  <div class="ingredient-card">
145
  {% if item.ingredients %}
146
  {% for ingredient in item.ingredients %}
 
153
  <p>No ingredients found for {{ item.name }}</p>
154
  {% endif %}
155
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  {% endfor %}
157
  </div>
158
  </div>
 
178
  <script>
179
  // JavaScript for showing ingredient details in modal
180
  function showIngredientDetails(name, image, healthBenefits, funFacts) {
 
181
  const healthBenefitsList = healthBenefits.split(',');
182
  const funFactsList = funFacts.split(',');
183
  document.getElementById("ingredientName").textContent = name;
 
201
  document.getElementById("ingredientModal").style.display = "none";
202
  }
203
 
204
+ // Debugging: Ensure ingredients are visible
205
  window.onload = function() {
206
  const items = document.querySelectorAll('.item-info');
207
  items.forEach(item => {
 
208
  const ingredients = item.nextElementSibling.querySelectorAll('.ingredient');
209
  ingredients.forEach(ingredient => {
210
+ console.log("Ingredient:", ingredient.querySelector('p').innerText);
211
  });
212
  });
213
  }