Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def update_cart(cart):
|
|
| 19 |
html_content = "<h3>Cart Items</h3><ul>"
|
| 20 |
for item in cart:
|
| 21 |
html_content += f"<li>{item}</li>"
|
| 22 |
-
html_content += "</ul><button onclick=
|
| 23 |
return html_content
|
| 24 |
|
| 25 |
# Function to filter dishes by category
|
|
@@ -77,8 +77,9 @@ with gr.Blocks() as demo:
|
|
| 77 |
<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Shopping_cart_icon.svg/512px-Shopping_cart_icon.svg.png' alt='Cart' style='width: 40px;' onclick='toggleCartPopup()'>
|
| 78 |
</div>
|
| 79 |
<div id='cart-popup' style='display: none; position: fixed; top: 50px; right: 10px; background: white; padding: 20px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);'>
|
|
|
|
| 80 |
<div id='cart-content'>Your cart is empty.</div>
|
| 81 |
-
<button onclick='
|
| 82 |
</div>
|
| 83 |
|
| 84 |
<div id='menu-popup' style='display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);'>
|
|
|
|
| 19 |
html_content = "<h3>Cart Items</h3><ul>"
|
| 20 |
for item in cart:
|
| 21 |
html_content += f"<li>{item}</li>"
|
| 22 |
+
html_content += "</ul><button onclick='alert("Order placed!")' style='padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px;'>Place Order</button>"
|
| 23 |
return html_content
|
| 24 |
|
| 25 |
# Function to filter dishes by category
|
|
|
|
| 77 |
<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Shopping_cart_icon.svg/512px-Shopping_cart_icon.svg.png' alt='Cart' style='width: 40px;' onclick='toggleCartPopup()'>
|
| 78 |
</div>
|
| 79 |
<div id='cart-popup' style='display: none; position: fixed; top: 50px; right: 10px; background: white; padding: 20px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);'>
|
| 80 |
+
<span onclick='toggleCartPopup()' style='position: absolute; top: 10px; right: 15px; font-size: 20px; font-weight: bold; cursor: pointer;'>×</span>
|
| 81 |
<div id='cart-content'>Your cart is empty.</div>
|
| 82 |
+
<button onclick='alert("Order placed!")' style='margin-top: 10px; padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px;'>Place Order</button>
|
| 83 |
</div>
|
| 84 |
|
| 85 |
<div id='menu-popup' style='display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);'>
|