Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
•
2bbbf6e
1
Parent(s):
f71ae13
fix: formatting and make interactive component invisible
Browse files
app.py
CHANGED
@@ -84,13 +84,18 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
|
|
84 |
)
|
85 |
|
86 |
with gr.Row():
|
87 |
-
html =
|
|
|
|
|
|
|
88 |
adventure_log = gr.HTML(html, label="Adventure Log", elem_id="adventure_log")
|
89 |
|
90 |
# handling player info
|
91 |
with gr.Row():
|
92 |
-
player_backend_id = gr.Textbox("", visible=
|
93 |
-
player_info_query_btn = gr.Button(
|
|
|
|
|
94 |
|
95 |
# actions when player login
|
96 |
player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
|
|
|
84 |
)
|
85 |
|
86 |
with gr.Row():
|
87 |
+
html = (
|
88 |
+
"<div style='max-width:100%; max-height:360px; overflow:auto'>"
|
89 |
+
+ get_content("htmls/adventure_blank.html")
|
90 |
+
)
|
91 |
adventure_log = gr.HTML(html, label="Adventure Log", elem_id="adventure_log")
|
92 |
|
93 |
# handling player info
|
94 |
with gr.Row():
|
95 |
+
player_backend_id = gr.Textbox("", visible=False, elem_id="player_backend_id")
|
96 |
+
player_info_query_btn = gr.Button(
|
97 |
+
"Query", elem_id="trigger_button", visible=False
|
98 |
+
)
|
99 |
|
100 |
# actions when player login
|
101 |
player_info_query_btn.click(get_player_info, player_backend_id, player_info).then(
|
theme.py
CHANGED
@@ -35,28 +35,20 @@ class Seafoam(Base):
|
|
35 |
super().set(
|
36 |
body_background_fill="url('https://storage.googleapis.com/wpassets.junyiacademy.org/1/2023/11/background-scaled.jpg') no-repeat center center / cover",
|
37 |
body_background_fill_dark="url('https://storage.googleapis.com/wpassets.junyiacademy.org/1/2023/11/background-scaled.jpg') no-repeat center center / cover",
|
38 |
-
|
39 |
body_text_color="#333",
|
40 |
body_text_color_dark="#333",
|
41 |
-
|
42 |
background_fill_primary="rgba(255, 255, 255, 1)",
|
43 |
background_fill_primary_dark="rgba(255, 255, 255, 1)",
|
44 |
-
|
45 |
background_fill_secondary="rgba(255, 255, 255, 0.0)",
|
46 |
background_fill_secondary_dark="rgba(255, 255, 255, 0)",
|
47 |
-
|
48 |
block_background_fill="rgba(255, 255, 255, 0.1)",
|
49 |
block_background_fill_dark="rgba(255, 255, 255, 0.1)",
|
50 |
-
|
51 |
block_border_color="rgba(255, 255, 255, 0.1)",
|
52 |
block_border_color_dark="rgba(255, 255, 255, 0.1)",
|
53 |
-
|
54 |
border_color_primary="trasparent",
|
55 |
border_color_primary_dark="trasparent",
|
56 |
-
|
57 |
slider_color="*secondary_300",
|
58 |
slider_color_dark="*secondary_600",
|
59 |
-
|
60 |
block_title_text_weight="600",
|
61 |
block_border_width="3px",
|
62 |
block_shadow="*shadow_drop_lg",
|
|
|
35 |
super().set(
|
36 |
body_background_fill="url('https://storage.googleapis.com/wpassets.junyiacademy.org/1/2023/11/background-scaled.jpg') no-repeat center center / cover",
|
37 |
body_background_fill_dark="url('https://storage.googleapis.com/wpassets.junyiacademy.org/1/2023/11/background-scaled.jpg') no-repeat center center / cover",
|
|
|
38 |
body_text_color="#333",
|
39 |
body_text_color_dark="#333",
|
|
|
40 |
background_fill_primary="rgba(255, 255, 255, 1)",
|
41 |
background_fill_primary_dark="rgba(255, 255, 255, 1)",
|
|
|
42 |
background_fill_secondary="rgba(255, 255, 255, 0.0)",
|
43 |
background_fill_secondary_dark="rgba(255, 255, 255, 0)",
|
|
|
44 |
block_background_fill="rgba(255, 255, 255, 0.1)",
|
45 |
block_background_fill_dark="rgba(255, 255, 255, 0.1)",
|
|
|
46 |
block_border_color="rgba(255, 255, 255, 0.1)",
|
47 |
block_border_color_dark="rgba(255, 255, 255, 0.1)",
|
|
|
48 |
border_color_primary="trasparent",
|
49 |
border_color_primary_dark="trasparent",
|
|
|
50 |
slider_color="*secondary_300",
|
51 |
slider_color_dark="*secondary_600",
|
|
|
52 |
block_title_text_weight="600",
|
53 |
block_border_width="3px",
|
54 |
block_shadow="*shadow_drop_lg",
|