ChenyuRabbitLove commited on
Commit
013e105
1 Parent(s): 57e2032

refactor: refactor adventure col and add achievements component

Browse files
Files changed (1) hide show
  1. app.py +18 -14
app.py CHANGED
@@ -58,21 +58,25 @@ with gr.Blocks(theme=seafoam, css=get_content("css/style.css")) as demo:
58
  )
59
 
60
  with gr.Column(scale=1):
61
- description = gr.Markdown("# 冒險階段", elem_id="adventure_description")
62
- progress_bar_html = (
63
- "<div style='max-width:100%; max-height:360px; overflow:auto'>"
64
- + get_content("htmls/progress_bar.html")
 
 
 
 
 
 
 
65
  )
66
- progress_bar = gr.HTML(
67
- progress_bar_html,
68
- )
69
-
70
- stage_desc_html = (
71
- "<div style='max-width:100%; max-height:360px; overflow:auto'>"
72
- + get_content("htmls/stage_desc.html")
73
- )
74
- stage_desc = gr.HTML(
75
- stage_desc_html,
76
  )
77
 
78
  with gr.Row():
 
58
  )
59
 
60
  with gr.Column(scale=1):
61
+ with gr.Column(elem_id="adventure_container"):
62
+ adventure_description = gr.Markdown("# 冒險階段", elem_id="adventure_description")
63
+ adverture = gr.Slider(
64
+ value=0,
65
+ show_label=False,
66
+ interactive=False,
67
+ elem_id="adventure_slider",
68
+ info="",
69
+ )
70
+ achievements_description = gr.Markdown(
71
+ "# 達成成就", elem_id="achievements_description"
72
  )
73
+ achievements = gr.HighlightedText(
74
+ value=[],
75
+ elem_classes="achievements",
76
+ color_map={
77
+ "完成": "green",
78
+ "未完成": "red",
79
+ },
 
 
 
80
  )
81
 
82
  with gr.Row():