Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def filter_menu(preference):
|
|
| 35 |
</div>
|
| 36 |
<div style="flex-shrink: 0; text-align: center;">
|
| 37 |
<img src="{item['Image URL']}" alt="{item['Dish Name']}" style="width: 100px; height: 100px; border-radius: 8px; object-fit: cover; margin-bottom: 10px;">
|
| 38 |
-
<button class="add-btn" style="background-color: #28a745; color: white; border: none; padding: 8px 15px; font-size: 14px; border-radius: 5px; cursor: pointer;" onclick="openModal('{item['Dish Name']}', '{item['Image URL']}', '{item['Description']}', '{item['Price ($)']}')">Add</button>
|
| 39 |
</div>
|
| 40 |
</div>
|
| 41 |
"""
|
|
@@ -123,7 +123,7 @@ def app():
|
|
| 123 |
</div>
|
| 124 |
<script>
|
| 125 |
let cart = [];
|
| 126 |
-
function openModal(name, image, description, price) {
|
| 127 |
const modal = document.getElementById('modal');
|
| 128 |
modal.style.display = 'block';
|
| 129 |
|
|
@@ -174,4 +174,4 @@ def app():
|
|
| 174 |
|
| 175 |
if __name__ == "__main__":
|
| 176 |
demo = app()
|
| 177 |
-
demo.launch()
|
|
|
|
| 35 |
</div>
|
| 36 |
<div style="flex-shrink: 0; text-align: center;">
|
| 37 |
<img src="{item['Image URL']}" alt="{item['Dish Name']}" style="width: 100px; height: 100px; border-radius: 8px; object-fit: cover; margin-bottom: 10px;">
|
| 38 |
+
<button class="add-btn" style="background-color: #28a745; color: white; border: none; padding: 8px 15px; font-size: 14px; border-radius: 5px; cursor: pointer;" onclick="openModal(event, '{item['Dish Name']}', '{item['Image URL']}', '{item['Description']}', '{item['Price ($)']}')">Add</button>
|
| 39 |
</div>
|
| 40 |
</div>
|
| 41 |
"""
|
|
|
|
| 123 |
</div>
|
| 124 |
<script>
|
| 125 |
let cart = [];
|
| 126 |
+
function openModal(event, name, image, description, price) {
|
| 127 |
const modal = document.getElementById('modal');
|
| 128 |
modal.style.display = 'block';
|
| 129 |
|
|
|
|
| 174 |
|
| 175 |
if __name__ == "__main__":
|
| 176 |
demo = app()
|
| 177 |
+
demo.launch()
|