James McCool commited on
Commit
30742ba
·
1 Parent(s): 38eab9f

Add custom Streamlit tab styling to improve UI aesthetics and user experience

Browse files
Files changed (1) hide show
  1. app.py +31 -0
app.py CHANGED
@@ -62,6 +62,37 @@ all_sim_vars = ['NHL_GAME_PLAYER_SHOTS_ON_GOAL', 'NHL_GAME_PLAYER_POINTS', 'NHL_
62
  pick6_sim_vars = ['Points', 'Shots on Goal', 'Assists', 'Blocks']
63
  sim_all_hold = pd.DataFrame(columns=['Player', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge'])
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  @st.cache_resource(ttl=200)
66
  def pull_baselines():
67
  sh = gcservice_account.open_by_url(NHL_Data)
 
62
  pick6_sim_vars = ['Points', 'Shots on Goal', 'Assists', 'Blocks']
63
  sim_all_hold = pd.DataFrame(columns=['Player', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge'])
64
 
65
+ st.markdown("""
66
+ <style>
67
+ /* Tab styling */
68
+ .stTabs [data-baseweb="tab-list"] {
69
+ gap: 8px;
70
+ padding: 4px;
71
+ }
72
+
73
+ .stTabs [data-baseweb="tab"] {
74
+ height: 50px;
75
+ white-space: pre-wrap;
76
+ background-color: #FFD700;
77
+ color: white;
78
+ border-radius: 10px;
79
+ gap: 1px;
80
+ padding: 10px 20px;
81
+ font-weight: bold;
82
+ transition: all 0.3s ease;
83
+ }
84
+
85
+ .stTabs [aria-selected="true"] {
86
+ background-color: #DAA520;
87
+ color: white;
88
+ }
89
+
90
+ .stTabs [data-baseweb="tab"]:hover {
91
+ background-color: #DAA520;
92
+ cursor: pointer;
93
+ }
94
+ </style>""", unsafe_allow_html=True)
95
+
96
  @st.cache_resource(ttl=200)
97
  def pull_baselines():
98
  sh = gcservice_account.open_by_url(NHL_Data)