James McCool commited on
Commit
ada64ff
·
1 Parent(s): f02bae9

Update Streamlit app styling and layout by modifying tab and button styles for improved visual consistency. Adjust column layout for data loading options, enhancing user experience and interface clarity.

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +13 -9
src/streamlit_app.py CHANGED
@@ -31,13 +31,12 @@ fd_columns = ['FLEX1', 'FLEX2', 'FLEX3', 'FLEX4', 'FLEX5', 'FLEX6', 'salary', 'p
31
  st.markdown("""
32
  <style>
33
  /* Tab styling */
34
- .stTabs [data-baseweb="tab-list"] {
35
  gap: 8px;
36
  padding: 4px;
37
  }
38
-
39
- .stTabs [data-baseweb="tab"] {
40
- height: 50px;
41
  white-space: pre-wrap;
42
  background-color: #DAA520;
43
  color: white;
@@ -47,17 +46,22 @@ st.markdown("""
47
  font-weight: bold;
48
  transition: all 0.3s ease;
49
  }
50
-
51
- .stTabs [aria-selected="true"] {
52
  background-color: #DAA520;
53
  border: 3px solid #FFD700;
54
  color: white;
55
  }
56
-
57
- .stTabs [data-baseweb="tab"]:hover {
58
  background-color: #FFD700;
59
  cursor: pointer;
60
  }
 
 
 
 
 
 
61
  </style>""", unsafe_allow_html=True)
62
 
63
  @st.cache_resource(ttl = 60)
@@ -296,7 +300,7 @@ if selected_tab == "Optimals":
296
  for key in st.session_state.keys():
297
  del st.session_state[key]
298
 
299
- col1, col2, col3, col4 = st.columns(5)
300
  with col1:
301
  slate_var1 = st.radio("Which data are you loading?", ('Regular', 'Showdown'))
302
  if slate_var1 == 'Regular':
 
31
  st.markdown("""
32
  <style>
33
  /* Tab styling */
34
+ .stElementContainer [data-baseweb="button-group"] {
35
  gap: 8px;
36
  padding: 4px;
37
  }
38
+ .stElementContainer [kind="segmented_control"] {
39
+ height: 45px;
 
40
  white-space: pre-wrap;
41
  background-color: #DAA520;
42
  color: white;
 
46
  font-weight: bold;
47
  transition: all 0.3s ease;
48
  }
49
+ .stElementContainer [kind="segmented_controlActive"] {
50
+ height: 50px;
51
  background-color: #DAA520;
52
  border: 3px solid #FFD700;
53
  color: white;
54
  }
55
+ .stElementContainer [kind="segmented_control"]:hover {
 
56
  background-color: #FFD700;
57
  cursor: pointer;
58
  }
59
+
60
+ div[data-baseweb="select"] > div {
61
+ background-color: #DAA520;
62
+ color: white;
63
+ }
64
+
65
  </style>""", unsafe_allow_html=True)
66
 
67
  @st.cache_resource(ttl = 60)
 
300
  for key in st.session_state.keys():
301
  del st.session_state[key]
302
 
303
+ col1, col2, col3, col4 = st.columns(4)
304
  with col1:
305
  slate_var1 = st.radio("Which data are you loading?", ('Regular', 'Showdown'))
306
  if slate_var1 == 'Regular':