Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -601,15 +601,12 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
601 |
session_history = gr.HTML(elem_classes="session-history")
|
602 |
close_btn = antd.Button("닫기", type="default", elem_classes="close-btn")
|
603 |
|
604 |
-
# 높이 일관성을 위한 변수 정의
|
605 |
-
panel_height = "900px"
|
606 |
-
content_height = "870px" # 헤더(30px)를 제외한 높이
|
607 |
-
|
608 |
with antd.Row(gutter=[32, 12], align="top", elem_classes="equal-height-container") as layout:
|
609 |
|
610 |
# 좌측 미리보기
|
611 |
with antd.Col(span=24, md=16, elem_classes="equal-height-col"):
|
612 |
-
|
|
|
613 |
gr.HTML(r"""
|
614 |
<div class="render_header">
|
615 |
<span class="header_btn"></span>
|
@@ -619,13 +616,13 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
619 |
""")
|
620 |
with antd.Tabs(active_key="empty", render_tab_bar="() => null") as state_tab:
|
621 |
with antd.Tabs.Item(key="empty"):
|
622 |
-
empty = antd.Empty(description="게임을 만들려면 설명을 입력하세요", elem_classes="right_content
|
623 |
with antd.Tabs.Item(key="loading"):
|
624 |
loading = antd.Spin(
|
625 |
-
True, tip="게임 코드 생성 중...", size="large", elem_classes="right_content
|
626 |
)
|
627 |
with antd.Tabs.Item(key="render"):
|
628 |
-
sandbox = gr.HTML(elem_classes="html_content
|
629 |
|
630 |
# 우측 입력/버튼/배포
|
631 |
with antd.Col(span=24, md=8, elem_classes="equal-height-col"):
|
@@ -642,15 +639,15 @@ with gr.Blocks(css_paths=["app.css"], theme=theme) as demo:
|
|
642 |
deploy_btn = antd.Button("배포", type="default", size="large", elem_classes="deploy-btn")
|
643 |
clear_btn = antd.Button("클리어", type="default", size="large", elem_classes="clear-btn")
|
644 |
|
645 |
-
#
|
646 |
-
with antd.Flex(vertical=True, gap="middle", wrap=True, elem_classes="input-panel
|
647 |
-
# 입력창의 높이를
|
648 |
input_text = antd.InputTextarea(
|
649 |
size="large",
|
650 |
allow_clear=True,
|
651 |
placeholder=random.choice(DEMO_LIST)['description'],
|
652 |
max_length=100000,
|
653 |
-
|
654 |
)
|
655 |
gr.HTML('<div class="help-text">💡 원하는 게임의 설명을 입력하세요. 예: "테트리스 게임 제작해줘."</div>')
|
656 |
|
|
|
601 |
session_history = gr.HTML(elem_classes="session-history")
|
602 |
close_btn = antd.Button("닫기", type="default", elem_classes="close-btn")
|
603 |
|
|
|
|
|
|
|
|
|
604 |
with antd.Row(gutter=[32, 12], align="top", elem_classes="equal-height-container") as layout:
|
605 |
|
606 |
# 좌측 미리보기
|
607 |
with antd.Col(span=24, md=16, elem_classes="equal-height-col"):
|
608 |
+
# style 속성 대신 CSS 클래스만 사용
|
609 |
+
with ms.Div(elem_classes="right_panel panel fixed-height"):
|
610 |
gr.HTML(r"""
|
611 |
<div class="render_header">
|
612 |
<span class="header_btn"></span>
|
|
|
616 |
""")
|
617 |
with antd.Tabs(active_key="empty", render_tab_bar="() => null") as state_tab:
|
618 |
with antd.Tabs.Item(key="empty"):
|
619 |
+
empty = antd.Empty(description="게임을 만들려면 설명을 입력하세요", elem_classes="right_content fixed-content-height")
|
620 |
with antd.Tabs.Item(key="loading"):
|
621 |
loading = antd.Spin(
|
622 |
+
True, tip="게임 코드 생성 중...", size="large", elem_classes="right_content fixed-content-height"
|
623 |
)
|
624 |
with antd.Tabs.Item(key="render"):
|
625 |
+
sandbox = gr.HTML(elem_classes="html_content fixed-content-height")
|
626 |
|
627 |
# 우측 입력/버튼/배포
|
628 |
with antd.Col(span=24, md=8, elem_classes="equal-height-col"):
|
|
|
639 |
deploy_btn = antd.Button("배포", type="default", size="large", elem_classes="deploy-btn")
|
640 |
clear_btn = antd.Button("클리어", type="default", size="large", elem_classes="clear-btn")
|
641 |
|
642 |
+
# style 속성 대신 CSS 클래스 사용
|
643 |
+
with antd.Flex(vertical=True, gap="middle", wrap=True, elem_classes="input-panel fixed-content-height"):
|
644 |
+
# 입력창의 높이를 CSS로 조정
|
645 |
input_text = antd.InputTextarea(
|
646 |
size="large",
|
647 |
allow_clear=True,
|
648 |
placeholder=random.choice(DEMO_LIST)['description'],
|
649 |
max_length=100000,
|
650 |
+
elem_classes="fixed-input-height"
|
651 |
)
|
652 |
gr.HTML('<div class="help-text">💡 원하는 게임의 설명을 입력하세요. 예: "테트리스 게임 제작해줘."</div>')
|
653 |
|