Spaces:
Runtime error
Runtime error
Update templates/menu.html
Browse files- templates/menu.html +6 -4
templates/menu.html
CHANGED
|
@@ -131,7 +131,6 @@
|
|
| 131 |
<form method="get" action="/menu" class="text-center mb-4">
|
| 132 |
<label for="category" class="form-label fw-bold">Filter by Category:</label>
|
| 133 |
<select id="category" name="category" class="form-select" onchange="this.form.submit()">
|
| 134 |
-
<option value="All" {% if selected_category == 'All' %}selected{% endif %}>All</option>
|
| 135 |
{% for category in categories %}
|
| 136 |
<option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>
|
| 137 |
{{ category }}
|
|
@@ -140,16 +139,17 @@
|
|
| 140 |
</select>
|
| 141 |
</form>
|
| 142 |
|
| 143 |
-
<!-- Menu Items -->
|
|
|
|
|
|
|
| 144 |
<div class="row">
|
| 145 |
-
{% for item in
|
| 146 |
<div class="col-md-6 mb-4">
|
| 147 |
<div class="card menu-card">
|
| 148 |
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
| 149 |
<div class="card-body">
|
| 150 |
<h5 class="card-title">{{ item.Name }}</h5>
|
| 151 |
<p class="card-text">${{ item.Price__c }}</p>
|
| 152 |
-
<p class="card-text"><small class="text-muted">{{ item.Category__c }}</small></p>
|
| 153 |
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
| 154 |
onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{item.Section__c}}','{{ selected_category }}')">
|
| 155 |
Add +
|
|
@@ -159,8 +159,10 @@
|
|
| 159 |
</div>
|
| 160 |
{% endfor %}
|
| 161 |
</div>
|
|
|
|
| 162 |
</div>
|
| 163 |
|
|
|
|
| 164 |
<!-- View Cart Button -->
|
| 165 |
<div class="view-cart-container">
|
| 166 |
<a href="/cart" class="view-cart-button">
|
|
|
|
| 131 |
<form method="get" action="/menu" class="text-center mb-4">
|
| 132 |
<label for="category" class="form-label fw-bold">Filter by Category:</label>
|
| 133 |
<select id="category" name="category" class="form-select" onchange="this.form.submit()">
|
|
|
|
| 134 |
{% for category in categories %}
|
| 135 |
<option value="{{ category }}" {% if selected_category == category %}selected{% endif %}>
|
| 136 |
{{ category }}
|
|
|
|
| 139 |
</select>
|
| 140 |
</form>
|
| 141 |
|
| 142 |
+
<!-- Display Menu Items by Section -->
|
| 143 |
+
{% for section, items in ordered_menu.items() %}
|
| 144 |
+
<h3 class="mt-4">{{ section }}</h3>
|
| 145 |
<div class="row">
|
| 146 |
+
{% for item in items %}
|
| 147 |
<div class="col-md-6 mb-4">
|
| 148 |
<div class="card menu-card">
|
| 149 |
<img src="{{ item.Image1__c }}" class="card-img-top menu-image" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
| 150 |
<div class="card-body">
|
| 151 |
<h5 class="card-title">{{ item.Name }}</h5>
|
| 152 |
<p class="card-text">${{ item.Price__c }}</p>
|
|
|
|
| 153 |
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
| 154 |
onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{item.Section__c}}','{{ selected_category }}')">
|
| 155 |
Add +
|
|
|
|
| 159 |
</div>
|
| 160 |
{% endfor %}
|
| 161 |
</div>
|
| 162 |
+
{% endfor %}
|
| 163 |
</div>
|
| 164 |
|
| 165 |
+
|
| 166 |
<!-- View Cart Button -->
|
| 167 |
<div class="view-cart-container">
|
| 168 |
<a href="/cart" class="view-cart-button">
|