gladguy commited on
Commit
1022c41
·
1 Parent(s): 80c153b

Add CSS to make modal popup float over content with backdrop

Browse files
Files changed (1) hide show
  1. app.py +28 -1
app.py CHANGED
@@ -702,7 +702,34 @@ def submit_viva_answer(answer, questions, current_q_idx, student_name=""):
702
 
703
 
704
  # Create Gradio interface
705
- with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
706
  # State variables
707
  student_name_state = gr.State("")
708
  viva_questions_state = gr.State([])
 
702
 
703
 
704
  # Create Gradio interface
705
+ with gr.Blocks(
706
+ title="AnatomyBot - MBBS Anatomy Tutor",
707
+ css="""
708
+ #registration_modal {
709
+ position: fixed !important;
710
+ top: 50% !important;
711
+ left: 50% !important;
712
+ transform: translate(-50%, -50%) !important;
713
+ z-index: 1000 !important;
714
+ background: white !important;
715
+ padding: 2rem !important;
716
+ border-radius: 10px !important;
717
+ box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
718
+ max-width: 600px !important;
719
+ width: 90% !important;
720
+ }
721
+ #registration_modal::before {
722
+ content: '';
723
+ position: fixed;
724
+ top: 0;
725
+ left: 0;
726
+ right: 0;
727
+ bottom: 0;
728
+ background: rgba(0, 0, 0, 0.5);
729
+ z-index: -1;
730
+ }
731
+ """
732
+ ) as demo:
733
  # State variables
734
  student_name_state = gr.State("")
735
  viva_questions_state = gr.State([])