nagasurendra commited on
Commit
a8ea6f9
·
verified ·
1 Parent(s): 9acada1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -22
app.py CHANGED
@@ -59,28 +59,29 @@ def app():
59
 
60
  # Modal window
61
  modal_window = gr.HTML("""
62
- <div id="modal" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50%; background: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); padding: 20px; z-index: 1000;">
63
- <div style="text-align: right;">
64
- <button onclick="closeModal()" style="background: none; border: none; font-size: 18px; cursor: pointer;">&times;</button>
65
- </div>
66
- <img id="modal-image" style="width: 100%; height: auto; border-radius: 8px; margin-bottom: 20px;" />
67
- <h2 id="modal-name"></h2>
68
- <p id="modal-description"></p>
69
- <p id="modal-price"></p>
70
- <label for="spice-level">Choose Spice Level:</label>
71
- <select id="spice-level">
72
- <option value="Mild">Mild</option>
73
- <option value="Medium">Medium</option>
74
- <option value="Spicy">Spicy</option>
75
- </select>
76
- <br><br>
77
- <label for="quantity">Quantity:</label>
78
- <input type="number" id="quantity" value="1" min="1" style="width: 50px;" />
79
- <br><br>
80
- <textarea id="special-instructions" placeholder="Add special instructions here..." style="width: 100%; height: 60px;"></textarea>
81
- <br><br>
82
- <button style="background-color: #28a745; color: white; border: none; padding: 10px 20px; font-size: 14px; border-radius: 5px; cursor: pointer;">Add to Cart</button>
83
- </div>
 
84
  <script>
85
  function openModal(name, image, description, price) {
86
  document.getElementById('modal').style.display = 'block';
 
59
 
60
  # Modal window
61
  modal_window = gr.HTML("""
62
+ <div id="modal" style="display: none; position: fixed; top: 40%; left: 50%; transform: translate(-50%, -40%); width: 50%; background: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); padding: 20px; z-index: 1000;">
63
+ <div style="text-align: right;">
64
+ <button onclick="closeModal()" style="background: none; border: none; font-size: 18px; cursor: pointer;">&times;</button>
65
+ </div>
66
+ <img id="modal-image" style="width: 100%; height: auto; border-radius: 8px; margin-bottom: 20px;" />
67
+ <h2 id="modal-name"></h2>
68
+ <p id="modal-description"></p>
69
+ <p id="modal-price"></p>
70
+ <label for="spice-level">Choose Spice Level:</label>
71
+ <select id="spice-level">
72
+ <option value="Mild">Mild</option>
73
+ <option value="Medium">Medium</option>
74
+ <option value="Spicy">Spicy</option>
75
+ </select>
76
+ <br><br>
77
+ <label for="quantity">Quantity:</label>
78
+ <input type="number" id="quantity" value="1" min="1" style="width: 50px;" />
79
+ <br><br>
80
+ <textarea id="special-instructions" placeholder="Add special instructions here..." style="width: 100%; height: 60px;"></textarea>
81
+ <br><br>
82
+ <button style="background-color: #28a745; color: white; border: none; padding: 10px 20px; font-size: 14px; border-radius: 5px; cursor: pointer;">Add to Cart</button>
83
+ </div>
84
+
85
  <script>
86
  function openModal(name, image, description, price) {
87
  document.getElementById('modal').style.display = 'block';