Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +50 -49
templates/menu.html
CHANGED
|
@@ -183,66 +183,67 @@
|
|
| 183 |
<h1 class="text-center">Menu</h1>
|
| 184 |
|
| 185 |
<!-- Category Filter -->
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
<div class="mb-3">
|
| 210 |
-
<label for="custom-dish-description" class="form-label">Dish Description</label>
|
| 211 |
-
<textarea class="form-control" id="custom-dish-description" name="description" required></textarea>
|
| 212 |
-
</div>
|
| 213 |
-
<button type="submit" class="btn btn-primary">Submit</button>
|
| 214 |
-
</form>
|
| 215 |
</div>
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
|
|
|
|
| 222 |
{% for section, items in ordered_menu.items() %}
|
| 223 |
-
|
| 224 |
-
<h3 class="mt-4">{{ section }}</h3>
|
| 225 |
<div class="row">
|
| 226 |
-
|
| 227 |
{% for item in items %}
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
|
|
|
| 238 |
</div>
|
| 239 |
</div>
|
| 240 |
-
</div>
|
| 241 |
{% endfor %}
|
| 242 |
</div>
|
| 243 |
-
</div>
|
| 244 |
{% endfor %}
|
| 245 |
</div>
|
|
|
|
|
|
|
|
|
|
| 246 |
|
| 247 |
<!-- View Cart Button -->
|
| 248 |
<div class="view-cart-container">
|
|
|
|
| 183 |
<h1 class="text-center">Menu</h1>
|
| 184 |
|
| 185 |
<!-- Category Filter -->
|
| 186 |
+
<!-- Category Filter -->
|
| 187 |
+
<form method="get" action="/menu" class="text-center mb-4">
|
| 188 |
+
<label for="category" class="form-label fw-bold">Filter by Category:</label>
|
| 189 |
+
<select id="category" name="category" class="form-select" onchange="this.form.submit()">
|
| 190 |
+
{% for category in categories %}
|
| 191 |
+
<option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>
|
| 192 |
+
{{ category }}
|
| 193 |
+
</option>
|
| 194 |
+
{% endfor %}
|
| 195 |
+
<option value="Customized Dish" {% if selected_category == "Customized Dish" %}selected{% endif %}>
|
| 196 |
+
Customized Dish
|
| 197 |
+
</option>
|
| 198 |
+
</select>
|
| 199 |
+
</form>
|
| 200 |
+
|
| 201 |
+
<!-- Display text boxes for Customized Dish -->
|
| 202 |
+
{% if selected_category == "Customized Dish" %}
|
| 203 |
+
<div id="custom-dish-form" class="mt-4">
|
| 204 |
+
<h3>Create Your Custom Dish</h3>
|
| 205 |
+
<form method="POST" action="/generate_custom_dish">
|
| 206 |
+
<div class="mb-3">
|
| 207 |
+
<label for="custom-dish-name" class="form-label">Dish Name</label>
|
| 208 |
+
<input type="text" class="form-control" id="custom-dish-name" name="name" required>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
</div>
|
| 210 |
+
<div class="mb-3">
|
| 211 |
+
<label for="custom-dish-description" class="form-label">Dish Description</label>
|
| 212 |
+
<textarea class="form-control" id="custom-dish-description" name="description" required></textarea>
|
| 213 |
+
</div>
|
| 214 |
+
<button type="submit" class="btn btn-primary">Submit</button>
|
| 215 |
+
</form>
|
| 216 |
+
</div>
|
| 217 |
+
{% else %}
|
| 218 |
+
<!-- Show menu items only when Customized Dish is not selected -->
|
| 219 |
+
<div class="container mt-4">
|
| 220 |
+
<h1 class="text-center">Menu</h1>
|
| 221 |
|
| 222 |
+
<!-- Menu Sections -->
|
| 223 |
{% for section, items in ordered_menu.items() %}
|
| 224 |
+
<h3>{{ section }}</h3>
|
|
|
|
| 225 |
<div class="row">
|
|
|
|
| 226 |
{% for item in items %}
|
| 227 |
+
<div class="col-md-6 mb-4">
|
| 228 |
+
<div class="card menu-card">
|
| 229 |
+
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
| 230 |
+
<div class="card-body">
|
| 231 |
+
<h5 class="card-title">{{ item.Name }}</h5>
|
| 232 |
+
<p class="card-text">${{ item.Price__c }}</p>
|
| 233 |
+
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
| 234 |
+
onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{ item.Section__c }}','{{ selected_category }}')">
|
| 235 |
+
Add +
|
| 236 |
+
</button>
|
| 237 |
+
</div>
|
| 238 |
</div>
|
| 239 |
</div>
|
|
|
|
| 240 |
{% endfor %}
|
| 241 |
</div>
|
|
|
|
| 242 |
{% endfor %}
|
| 243 |
</div>
|
| 244 |
+
{% endif %}
|
| 245 |
+
|
| 246 |
+
</div>
|
| 247 |
|
| 248 |
<!-- View Cart Button -->
|
| 249 |
<div class="view-cart-container">
|