nesticot commited on
Commit
6f5a358
·
verified ·
1 Parent(s): 38f2820

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -27
app.py CHANGED
@@ -137,8 +137,31 @@ from shiny import App, reactive, ui, render
137
  from shiny.ui import h2, tags
138
 
139
  # Define the UI layout for the app
140
- app_ui = ui.page_fluid(
141
- # Header content with markdown
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  ui.tags.div(
143
  {"style": "width:90%;margin: 0 auto;max-width: 1600px;"},
144
  ui.tags.style(
@@ -162,31 +185,6 @@ app_ui = ui.page_fluid(
162
  ui.markdown("""
163
  For ease of sharing, you can right-click (desktop) or press+hold (mobile) to save/copy the image.
164
  """),
165
- ),
166
-
167
- # Page sidebar with tabs
168
- ui.page_sidebar(
169
- # Sidebar content
170
- ui.sidebar(
171
- # Row for selecting season and level
172
- ui.row(
173
- ui.column(6, ui.input_select('year_input', 'Select Season', year_list, selected=2024)),
174
- ui.column(6, ui.input_select('level_input', 'Select Level', level_dict)),
175
- ),
176
- # Row for the action button to get player list
177
- ui.row(ui.input_action_button("player_button", "Get Player List", class_="btn-primary")),
178
- # Row for selecting the player
179
- ui.row(ui.column(12, ui.output_ui('player_select_ui', 'Select Player'))),
180
-
181
- ui.row(
182
- ui.column(6, ui.input_switch("switch", "Custom Team?", False)),
183
- ui.column(6, ui.input_select('logo_select', 'Select Custom Logo', image_dict_flip, multiple=False))
184
- ),
185
-
186
- # Row for the action button to generate plot
187
- ui.row(ui.input_action_button("generate_plot", "Generate Plot", class_="btn-primary")),
188
- width="400px"
189
- ),
190
 
191
  # Tabs
192
  ui.navset_tab(
 
137
  from shiny.ui import h2, tags
138
 
139
  # Define the UI layout for the app
140
+ # Define the UI layout for the app
141
+ app_ui = ui.page_sidebar(
142
+ # Sidebar content
143
+ ui.sidebar(
144
+ # Row for selecting season and level
145
+ ui.row(
146
+ ui.column(6, ui.input_select('year_input', 'Select Season', year_list, selected=2024)),
147
+ ui.column(6, ui.input_select('level_input', 'Select Level', level_dict)),
148
+ ),
149
+ # Row for the action button to get player list
150
+ ui.row(ui.input_action_button("player_button", "Get Player List", class_="btn-primary")),
151
+ # Row for selecting the player
152
+ ui.row(ui.column(12, ui.output_ui('player_select_ui', 'Select Player'))),
153
+
154
+ ui.row(
155
+ ui.column(6, ui.input_switch("switch", "Custom Team?", False)),
156
+ ui.column(6, ui.input_select('logo_select', 'Select Custom Logo', image_dict_flip, multiple=False))
157
+ ),
158
+
159
+ # Row for the action button to generate plot
160
+ ui.row(ui.input_action_button("generate_plot", "Generate Plot", class_="btn-primary")),
161
+ width="400px"
162
+ ),
163
+
164
+ # Main content area with header and tabs
165
  ui.tags.div(
166
  {"style": "width:90%;margin: 0 auto;max-width: 1600px;"},
167
  ui.tags.style(
 
185
  ui.markdown("""
186
  For ease of sharing, you can right-click (desktop) or press+hold (mobile) to save/copy the image.
187
  """),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
  # Tabs
190
  ui.navset_tab(