lss9566 commited on
Commit
8142ae5
·
verified ·
1 Parent(s): 8b14f38

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -56,8 +56,8 @@ def create_quiz_app():
56
 
57
  # iframe(srcdoc)로 전체 문서를 로드하여 스크립트가 확실히 실행되도록 함
58
  iframe_html = f"""
59
- <div style=\"width:100%; height:100vh;\">
60
- <iframe id=\"quiz_iframe\" style=\"width:100%; height:100%; border:none;\" srcdoc='{srcdoc_html}'></iframe>
61
  </div>
62
  """
63
 
@@ -65,17 +65,17 @@ def create_quiz_app():
65
  title="인적자원관리 퀴즈",
66
  theme=gr.themes.Soft(),
67
  css="""
68
- .gradio-container {
69
- max-width: none !important;
70
- padding: 0 !important;
71
- }
72
- .main {
73
- padding: 0 !important;
74
- }
75
- .block {
76
- border: none !important;
77
- box-shadow: none !important;
78
- margin: 0 !important;
79
  }
80
  """
81
  ) as app:
 
56
 
57
  # iframe(srcdoc)로 전체 문서를 로드하여 스크립트가 확실히 실행되도록 함
58
  iframe_html = f"""
59
+ <div class=\"iframe-wrap\">
60
+ <iframe id=\"quiz_iframe\" class=\"iframe\" srcdoc='{srcdoc_html}'></iframe>
61
  </div>
62
  """
63
 
 
65
  title="인적자원관리 퀴즈",
66
  theme=gr.themes.Soft(),
67
  css="""
68
+ .gradio-container { max-width: none !important; padding: 0 !important; }
69
+ .main { padding: 0 !important; }
70
+ .block { border: none !important; box-shadow: none !important; margin: 0 !important; }
71
+
72
+ /* Responsive iframe sizing */
73
+ .iframe-wrap { width: 100%; height: 100vh; }
74
+ .iframe { width: 100%; height: 100%; border: none; }
75
+
76
+ @media (max-width: 480px) {
77
+ .iframe-wrap { height: 92vh; }
78
+ .iframe { height: 100%; }
79
  }
80
  """
81
  ) as app: