Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,6 +97,7 @@ with gr.Blocks() as demo:
|
|
| 97 |
<div id="popup" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
|
| 98 |
background-color: white; padding: 20px; border-radius: 10px;
|
| 99 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 1000; text-align: center; width: 500px;">
|
|
|
|
| 100 |
<h2 id="popup-title" style="margin-top: 20px; color: #444;"></h2>
|
| 101 |
<p id="popup-description" style="margin-top: 10px; font-size: 16px; color: #666;"></p>
|
| 102 |
<p id="popup-price" style="margin-top: 10px; font-size: 16px; color: #444;"></p>
|
|
@@ -108,8 +109,7 @@ with gr.Blocks() as demo:
|
|
| 108 |
<div style="display: flex; flex-wrap: wrap;">
|
| 109 |
""" + "".join([f'<label><input type="checkbox" name="extras" value="{extra["name"]}">{extra["name"]} + {extra["price"]}</label>' for extra in extras]) + """
|
| 110 |
</div>
|
| 111 |
-
<button onclick="addItemToCart()" style="margin-top: 20px;">Add to Cart</button>
|
| 112 |
-
<button onclick="closePopup()">Close</button>
|
| 113 |
</div>
|
| 114 |
<script>
|
| 115 |
let selectedDish = "";
|
|
|
|
| 97 |
<div id="popup" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
|
| 98 |
background-color: white; padding: 20px; border-radius: 10px;
|
| 99 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 1000; text-align: center; width: 500px;">
|
| 100 |
+
<div style="position: absolute; top: 10px; right: 10px; cursor: pointer; font-size: 20px; font-weight: bold;" onclick="closePopup()">×</div>
|
| 101 |
<h2 id="popup-title" style="margin-top: 20px; color: #444;"></h2>
|
| 102 |
<p id="popup-description" style="margin-top: 10px; font-size: 16px; color: #666;"></p>
|
| 103 |
<p id="popup-price" style="margin-top: 10px; font-size: 16px; color: #444;"></p>
|
|
|
|
| 109 |
<div style="display: flex; flex-wrap: wrap;">
|
| 110 |
""" + "".join([f'<label><input type="checkbox" name="extras" value="{extra["name"]}">{extra["name"]} + {extra["price"]}</label>' for extra in extras]) + """
|
| 111 |
</div>
|
| 112 |
+
<button onclick="addItemToCart()" style="margin-top: 20px; padding: 10px 20px; background-color: #28a745; color: white; border: none; border-radius: 5px;">Add to Cart</button>
|
|
|
|
| 113 |
</div>
|
| 114 |
<script>
|
| 115 |
let selectedDish = "";
|