haepada commited on
Commit
1b67940
·
verified ·
1 Parent(s): 09c8ee4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -25
app.py CHANGED
@@ -590,10 +590,9 @@ def create_interface():
590
  css = """
591
  @media (max-width: 600px) {
592
  .container { padding: 10px !important; }
593
- .gradio-row {
594
- flex-direction: column !important;
595
- gap: 10px !important;
596
- }
597
  .gradio-button {
598
  width: 100% !important;
599
  margin: 5px 0 !important;
@@ -628,51 +627,43 @@ def create_interface():
628
  text-align: center;
629
  margin-top: 20px;
630
  }
631
-
632
  .logo-image {
633
- width: 150px; /* 로고 크기 */
634
  margin: 0 auto;
635
- display: block;
636
  }
637
-
638
- /* 메인 이미지 스타일 */
639
  .main-image-container {
640
  text-align: center;
641
  margin-top: 20px;
642
  margin-bottom: 20px;
643
  }
644
-
645
- .main-image {
646
- width: 100%; /* 화면 폭에 맞춤 */
647
- max-width: 100%; /* 모바일 화면에도 맞추기 */
648
- height: auto; /* 비율 유지 */
649
  margin: 0 auto;
650
  display: block;
651
- border-radius: 8px; /* 모서리 둥글게 */
652
  }
653
  """
654
 
655
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
656
  state = gr.State(value=initial_state)
657
-
658
- gr.Markdown("![디지털 굿판 로고](static/DIGITAL_GUTPAN_LOGO.png)")
659
- gr.Markdown("""
660
- 1. 입장 → 2. 청신 → 3. 기원 → 4. 송신
661
- 순서대로 진행해주세요.
662
- """)
663
 
664
  with gr.Tabs(selected=0) as tabs:
665
  # 입장 탭 (축원 포함)
666
  with gr.TabItem("입장") as tab_entrance:
667
  # 1단계: 첫 화면
668
  with gr.Column(visible=True) as welcome_section:
669
- # 로고 이미지 추가
670
  gr.Image(
671
- value="static/main-image.png", # 이미지 경로를 설정합니다.
672
- label=None,
673
  show_label=False,
674
  interactive=False,
675
- elem_id="main-image" # CSS 스타일을 지정하기 위해 ID 설정
676
  )
677
 
678
  # 기존 텍스트 및 다른 요소들
 
590
  css = """
591
  @media (max-width: 600px) {
592
  .container { padding: 10px !important; }
593
+ .gradio-button { width: 100% !important; }
594
+ #main-image { width: 100% !important; height: auto !important; } /* Full width on mobile */
595
+ }
 
596
  .gradio-button {
597
  width: 100% !important;
598
  margin: 5px 0 !important;
 
627
  text-align: center;
628
  margin-top: 20px;
629
  }
630
+
631
  .logo-image {
632
+ width: 150px;
633
  margin: 0 auto;
 
634
  }
635
+
 
636
  .main-image-container {
637
  text-align: center;
638
  margin-top: 20px;
639
  margin-bottom: 20px;
640
  }
641
+
642
+ #main-image {
643
+ width: 600px;
644
+ height: 600px;
 
645
  margin: 0 auto;
646
  display: block;
647
+ border-radius: 8px;
648
  }
649
  """
650
 
651
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
652
  state = gr.State(value=initial_state)
653
+ with gr.Row(elem_id="logo-container"):
654
+ gr.Image(value="static/DIGITAL_GUTPAN_LOGO.png", show_label=False, interactive=False, elem_id="logo-image")
 
 
 
 
655
 
656
  with gr.Tabs(selected=0) as tabs:
657
  # 입장 탭 (축원 포함)
658
  with gr.TabItem("입장") as tab_entrance:
659
  # 1단계: 첫 화면
660
  with gr.Column(visible=True) as welcome_section:
661
+ # Main image
662
  gr.Image(
663
+ value="static/main-image.png",
 
664
  show_label=False,
665
  interactive=False,
666
+ elem_id="main-image"
667
  )
668
 
669
  # 기존 텍스트 및 다른 요소들