Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -129,6 +129,53 @@ def app():
|
|
| 129 |
</div>
|
| 130 |
</div>
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
<script>
|
| 133 |
let cart = [];
|
| 134 |
function openModal(name, image, description, price) {
|
|
|
|
| 129 |
</div>
|
| 130 |
</div>
|
| 131 |
|
| 132 |
+
with gr.Blocks() as demo:
|
| 133 |
+
with gr.Row():
|
| 134 |
+
gr.HTML(generate_food_menu()) # Render food menu
|
| 135 |
+
gr.HTML("""
|
| 136 |
+
<div id=\"popup\" class=\"popup\" style=\"display:none; position:fixed; top:50%; left:50%; transform:translate(-50%, -50%); max-width:90%; width:600px; max-height:90%; overflow-y:auto; background:rgba(255, 255, 255, 0.95); display:flex; flex-direction: column; justify-content:center; align-items:center; border-radius: 15px; padding: 20px; box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);\">
|
| 137 |
+
<button onclick=\"closePopup()\" style=\"position:absolute; top:10px; right:10px; background:none; border:none; font-size:20px; cursor:pointer;\">×</button>
|
| 138 |
+
<div class=\"popup-content\" style=\"background:#fff; padding:20px; border-radius:15px; width:100%; text-align:center;\">
|
| 139 |
+
<img id=\"popup-image\" src=\"\" alt=\"Food Image\" style=\"width:100%; height:auto; border-radius:10px;\">
|
| 140 |
+
<h2 id=\"popup-name\" style=\"margin: 15px 0;\"></h2>
|
| 141 |
+
<p id=\"popup-price\" style=\"margin: 0; font-size: 16px; color: #333;\"></p>
|
| 142 |
+
<p id=\"popup-description\" style=\"margin: 10px 0; font-size: 14px; color: #666;\"></p>
|
| 143 |
+
<div style=\"margin: 10px 0; text-align: left;\">
|
| 144 |
+
<h4 style=\"margin-bottom: 5px;\">Choose a spice level:</h4>
|
| 145 |
+
<p style=\"font-size: 12px; color: #777; margin: 0 0 10px;\">Required - Choose 1.</p>
|
| 146 |
+
<div style=\"display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;\">
|
| 147 |
+
<label><input type=\"radio\" name=\"spice-level\"> American Mild</label>
|
| 148 |
+
<label><input type=\"radio\" name=\"spice-level\"> American Medium</label>
|
| 149 |
+
<label><input type=\"radio\" name=\"spice-level\"> American Spicy</label>
|
| 150 |
+
<label><input type=\"radio\" name=\"spice-level\"> Indian Mid</label>
|
| 151 |
+
<label><input type=\"radio\" name=\"spice-level\"> Indian Medium</label>
|
| 152 |
+
<label><input type=\"radio\" name=\"spice-level\"> Indian Spicy</label>
|
| 153 |
+
<label><input type=\"radio\" name=\"spice-level\"> Indian Very Spicy</label>
|
| 154 |
+
</div>
|
| 155 |
+
<h4 style=\"margin-top: 15px;\">Biryani Extra's</h4>
|
| 156 |
+
<p style=\"font-size: 12px; color: #777; margin: 0 0 10px;\">Optional - Choose as many as you like.</p>
|
| 157 |
+
<div style=\"display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;\">
|
| 158 |
+
<label><input type=\"checkbox\"> Extra Raitha 4oz + $1.00</label>
|
| 159 |
+
<label><input type=\"checkbox\"> Extra Raitha 8oz + $2.00</label>
|
| 160 |
+
<label><input type=\"checkbox\"> Extra Salan 4oz + $1.00</label>
|
| 161 |
+
<label><input type=\"checkbox\"> Extra Salan 8oz + $2.00</label>
|
| 162 |
+
<label><input type=\"checkbox\"> Extra Onion + $1.00</label>
|
| 163 |
+
<label><input type=\"checkbox\"> Extra Onion & Lemon + $2.00</label>
|
| 164 |
+
<label><input type=\"checkbox\"> Extra Fried Onion 4oz + $2.00</label>
|
| 165 |
+
</div>
|
| 166 |
+
<h4 style=\"margin-top: 15px;\">Special instructions</h4>
|
| 167 |
+
<textarea placeholder=\"Add any requests here.\" style=\"width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ddd;\"></textarea>
|
| 168 |
+
<h4 style=\"margin-top: 15px;\">Quantity</h4>
|
| 169 |
+
<div style=\"display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 15px;\">
|
| 170 |
+
<button style=\"padding: 5px 10px; font-size: 16px;\">-</button>
|
| 171 |
+
<input type=\"number\" value=\"1\" min=\"1\" style=\"width: 50px; text-align: center;\">
|
| 172 |
+
<button style=\"padding: 5px 10px; font-size: 16px;\">+</button>
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
| 175 |
+
<button style=\"margin-top:20px; padding:10px 20px; background:purple; color:#fff; border:none; border-radius:5px; cursor:pointer;\">Add to Bag</button>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
""")
|
| 179 |
<script>
|
| 180 |
let cart = [];
|
| 181 |
function openModal(name, image, description, price) {
|