Spaces:
Sleeping
Sleeping
Update components/popup_card.py
Browse files- components/popup_card.py +6 -1
components/popup_card.py
CHANGED
|
@@ -13,9 +13,14 @@ def generate_popup_card(name, model_path):
|
|
| 13 |
<input type="number" id="quantity" min="1" max="10" value="1" style="width: 100%; margin-bottom: 10px; padding: 5px; border: 1px solid #ccc; border-radius: 5px;">
|
| 14 |
<div style="text-align: center;">
|
| 15 |
<button style="padding: 10px 20px; background-color: #008cba; color: white; border: none; border-radius: 5px; cursor: pointer;">Add to Cart</button>
|
| 16 |
-
<button style="padding: 10px 20px; background-color: #ccc; color: black; border: none; border-radius: 5px; margin-left: 10px; cursor: pointer;"
|
| 17 |
</div>
|
| 18 |
</div>
|
| 19 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
"""
|
| 21 |
return html_content
|
|
|
|
| 13 |
<input type="number" id="quantity" min="1" max="10" value="1" style="width: 100%; margin-bottom: 10px; padding: 5px; border: 1px solid #ccc; border-radius: 5px;">
|
| 14 |
<div style="text-align: center;">
|
| 15 |
<button style="padding: 10px 20px; background-color: #008cba; color: white; border: none; border-radius: 5px; cursor: pointer;">Add to Cart</button>
|
| 16 |
+
<button id="closeButton" style="padding: 10px 20px; background-color: #ccc; color: black; border: none; border-radius: 5px; margin-left: 10px; cursor: pointer;">Close</button>
|
| 17 |
</div>
|
| 18 |
</div>
|
| 19 |
</div>
|
| 20 |
+
<script>
|
| 21 |
+
document.getElementById('closeButton').onclick = function() {{
|
| 22 |
+
document.getElementById('overlay').style.display = 'none';
|
| 23 |
+
}};
|
| 24 |
+
</script>
|
| 25 |
"""
|
| 26 |
return html_content
|