imorcillo commited on
Commit
2a943c8
·
verified ·
1 Parent(s): ebba43e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -18
app.py CHANGED
@@ -168,30 +168,37 @@ button.selected::after{
168
 
169
 
170
  demo = gr.Blocks(css="""
171
- #popup-modal {
172
  position: fixed;
173
  top: 0; left: 0;
174
  width: 100vw; height: 100vh;
175
  background: rgba(0,0,0,0.5);
 
176
  display: flex;
177
  justify-content: center;
178
  align-items: center;
179
- z-index: 999;
180
  }
181
- #popup-content {
182
- background: white;
 
183
  padding: 20px;
184
  border-radius: 10px;
185
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
 
186
  text-align: center;
187
- width: 300px;
188
  }
189
- #popup-button {
190
- margin-top: 15px;
191
  background-color: #5b65a7;
192
  color: white;
 
 
 
 
 
193
  }
194
- #popup-button:hover {
195
  background-color: #3c4687;
196
  }
197
  """)
@@ -268,17 +275,19 @@ with demo:
268
  )
269
 
270
  ###############################
271
- popup = gr.Column(visible=False, elem_id="popup-modal")
272
  with popup:
273
- with gr.Column(elem_id="popup-content"):
274
- gr.Markdown("""
275
- ### ℹ️ Notice
276
-
277
- Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.
278
- No se guardan las grabaciones y se eliminan automáticamente.
279
- The recordings are not saved and are automatically removed.
280
- """)
281
- ok_btn = gr.Button("OK", elem_id="popup-button")
 
 
282
  ok_btn.click(fn=hide_popup, outputs=popup)
283
 
284
  # Show on load
 
168
 
169
 
170
  demo = gr.Blocks(css="""
171
+ .popup-overlay {
172
  position: fixed;
173
  top: 0; left: 0;
174
  width: 100vw; height: 100vh;
175
  background: rgba(0,0,0,0.5);
176
+ z-index: 999;
177
  display: flex;
178
  justify-content: center;
179
  align-items: center;
180
+ flex-direction: column;
181
  }
182
+
183
+ .popup-box {
184
+ background-color: white;
185
  padding: 20px;
186
  border-radius: 10px;
187
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
188
+ width: 340px;
189
  text-align: center;
 
190
  }
191
+
192
+ .popup-button {
193
  background-color: #5b65a7;
194
  color: white;
195
+ padding: 10px 20px;
196
+ border-radius: 8px;
197
+ margin-top: 10px;
198
+ border: none;
199
+ cursor: pointer;
200
  }
201
+ .popup-button:hover {
202
  background-color: #3c4687;
203
  }
204
  """)
 
275
  )
276
 
277
  ###############################
278
+ popup = gr.Column(visible=False, elem_classes="popup-overlay")
279
  with popup:
280
+ with gr.Column(elem_classes="popup-box"):
281
+ gr.Markdown(
282
+ """
283
+ ### ℹ️ Notice
284
+
285
+ Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.
286
+ No se guardan las grabaciones y se eliminan automáticamente.
287
+ The recordings are not saved and are automatically removed.
288
+ """
289
+ )
290
+ ok_btn = gr.Button("OK", elem_classes="popup-button")
291
  ok_btn.click(fn=hide_popup, outputs=popup)
292
 
293
  # Show on load