Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,9 +59,10 @@ modal_and_cart_js = """
|
|
| 59 |
}
|
| 60 |
const modal = document.getElementById('modal');
|
| 61 |
modal.style.display = 'block';
|
| 62 |
-
modal.style.position = '
|
| 63 |
-
modal.style.top =
|
| 64 |
-
modal.style.left =
|
|
|
|
| 65 |
|
| 66 |
document.getElementById('modal-image').src = image;
|
| 67 |
document.getElementById('modal-name').innerText = name;
|
|
@@ -153,7 +154,7 @@ def app():
|
|
| 153 |
|
| 154 |
# Modal window
|
| 155 |
modal_window = gr.HTML("""
|
| 156 |
-
<div id="modal" style="display: none; position:
|
| 157 |
<div style="text-align: right;">
|
| 158 |
<button onclick="closeModal()" style="background: none; border: none; font-size: 18px; cursor: pointer;">×</button>
|
| 159 |
</div>
|
|
|
|
| 59 |
}
|
| 60 |
const modal = document.getElementById('modal');
|
| 61 |
modal.style.display = 'block';
|
| 62 |
+
modal.style.position = 'fixed';
|
| 63 |
+
modal.style.top = '10%';
|
| 64 |
+
modal.style.left = '50%';
|
| 65 |
+
modal.style.transform = 'translate(-50%, 0)';
|
| 66 |
|
| 67 |
document.getElementById('modal-image').src = image;
|
| 68 |
document.getElementById('modal-name').innerText = name;
|
|
|
|
| 154 |
|
| 155 |
# Modal window
|
| 156 |
modal_window = gr.HTML("""
|
| 157 |
+
<div id="modal" style="display: none; position: fixed; background: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); padding: 20px; z-index: 1000;">
|
| 158 |
<div style="text-align: right;">
|
| 159 |
<button onclick="closeModal()" style="background: none; border: none; font-size: 18px; cursor: pointer;">×</button>
|
| 160 |
</div>
|