Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -178,6 +178,9 @@ button.selected::after{
|
|
| 178 |
z-index: 999;
|
| 179 |
flex-direction: column;
|
| 180 |
}
|
|
|
|
|
|
|
|
|
|
| 181 |
#popup-box {
|
| 182 |
background: white;
|
| 183 |
padding: 20px;
|
|
@@ -271,10 +274,11 @@ with demo:
|
|
| 271 |
],
|
| 272 |
allow_flagging="never",
|
| 273 |
)
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
|
|
|
| 278 |
<div id="popup-box">
|
| 279 |
<h3>ℹ️ Notice</h3>
|
| 280 |
<p>Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.<br>
|
|
@@ -283,25 +287,29 @@ with demo:
|
|
| 283 |
<button id="popup-button">OK</button>
|
| 284 |
</div>
|
| 285 |
</div>
|
| 286 |
-
|
|
|
|
|
|
|
|
|
|
| 287 |
<script>
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
</script>
|
| 303 |
""")
|
| 304 |
-
|
|
|
|
| 305 |
gr.HTML("""
|
| 306 |
<div id="orai-info">
|
| 307 |
<div class="logos">
|
|
|
|
| 178 |
z-index: 999;
|
| 179 |
flex-direction: column;
|
| 180 |
}
|
| 181 |
+
#popup-overlay.show {
|
| 182 |
+
display: flex !important;
|
| 183 |
+
}
|
| 184 |
#popup-box {
|
| 185 |
background: white;
|
| 186 |
padding: 20px;
|
|
|
|
| 274 |
],
|
| 275 |
allow_flagging="never",
|
| 276 |
)
|
| 277 |
+
|
| 278 |
+
###############################
|
| 279 |
+
# Popup HTML (initially hidden)
|
| 280 |
+
popup_html = gr.HTML("""
|
| 281 |
+
<div id="popup-overlay">
|
| 282 |
<div id="popup-box">
|
| 283 |
<h3>ℹ️ Notice</h3>
|
| 284 |
<p>Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.<br>
|
|
|
|
| 287 |
<button id="popup-button">OK</button>
|
| 288 |
</div>
|
| 289 |
</div>
|
| 290 |
+
""", elem_id="popup-overlay")
|
| 291 |
+
|
| 292 |
+
# JavaScript to show/hide popup
|
| 293 |
+
gr.HTML("""
|
| 294 |
<script>
|
| 295 |
+
window.addEventListener('DOMContentLoaded', function () {
|
| 296 |
+
const popup = document.getElementById("popup-overlay");
|
| 297 |
+
const button = document.getElementById("popup-button");
|
| 298 |
+
|
| 299 |
+
if (popup) {
|
| 300 |
+
popup.classList.add("show"); // Show popup on load
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
if (button) {
|
| 304 |
+
button.onclick = () => {
|
| 305 |
+
popup.classList.remove("show"); // Hide popup on click
|
| 306 |
+
};
|
| 307 |
+
}
|
| 308 |
+
});
|
| 309 |
</script>
|
| 310 |
""")
|
| 311 |
+
###################
|
| 312 |
+
|
| 313 |
gr.HTML("""
|
| 314 |
<div id="orai-info">
|
| 315 |
<div class="logos">
|