Spaces:
Sleeping
Sleeping
Update pages/2_Workout_Plan.py
Browse files- pages/2_Workout_Plan.py +41 -50
pages/2_Workout_Plan.py
CHANGED
|
@@ -61,7 +61,14 @@ html,body,.stApp,[data-testid="stAppViewContainer"]{
|
|
| 61 |
letter-spacing:2px;color:#fff;line-height:1;margin-bottom:6px;
|
| 62 |
}
|
| 63 |
.plan-hero-title em{color:#E50914;font-style:normal;}
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
/* βββ STATS ROW βββ */
|
| 67 |
.stats-row{
|
|
@@ -157,48 +164,31 @@ html,body,.stApp,[data-testid="stAppViewContainer"]{
|
|
| 157 |
margin:0 3px;
|
| 158 |
}
|
| 159 |
|
| 160 |
-
/* βββ ACTION BUTTONS βββ */
|
| 161 |
-
.stButton>button{
|
| 162 |
-
background:
|
| 163 |
-
border:
|
| 164 |
-
color:
|
| 165 |
-
border-radius:
|
| 166 |
font-family:'DM Sans',sans-serif!important;
|
| 167 |
-
font-size:0.85rem!important;font-weight:
|
| 168 |
padding:12px 24px!important;
|
| 169 |
-
transition:all 0.2s!important;
|
| 170 |
letter-spacing:0.5px!important;
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
border-color:rgba(255,255,255,0.6)!important;
|
| 175 |
-
color:#fff!important;
|
| 176 |
-
transform:translateY(-1px)!important;
|
| 177 |
}
|
| 178 |
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
box-shadow:0 4px 20px rgba(229,9,20,0.3)!important;
|
| 184 |
-
}
|
| 185 |
-
.regen-btn .stButton>button:hover{
|
| 186 |
-
background:#f6121d!important;border-color:#f6121d!important;
|
| 187 |
-
box-shadow:0 6px 28px rgba(229,9,20,0.5)!important;
|
| 188 |
}
|
| 189 |
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
color:rgba(255,255,255,0.5)!important;
|
| 195 |
-
padding:8px 18px!important;
|
| 196 |
-
font-size:0.78rem!important;
|
| 197 |
-
box-shadow:none!important;
|
| 198 |
-
}
|
| 199 |
-
.logout-btn .stButton>button:hover{
|
| 200 |
-
border-color:rgba(255,255,255,0.5)!important;
|
| 201 |
-
color:#fff!important;transform:none!important;box-shadow:none!important;
|
| 202 |
}
|
| 203 |
|
| 204 |
/* βββ SPINNER βββ */
|
|
@@ -230,20 +220,23 @@ prompt, bmi, category = build_prompt(
|
|
| 230 |
equipment=data["equipment"]
|
| 231 |
)
|
| 232 |
|
| 233 |
-
# ββ TOPNAV ββ
|
| 234 |
-
c1, c2
|
| 235 |
with c1:
|
| 236 |
-
st.markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
with c2:
|
| 238 |
-
st.
|
| 239 |
-
with c3:
|
| 240 |
-
st.markdown("<div class='logout-btn'>", unsafe_allow_html=True)
|
| 241 |
-
if st.button("Sign Out", key="nav_logout"):
|
| 242 |
logout(st.session_state.get("username",""))
|
| 243 |
for k in ["logged_in","username","auth_token","user_data","workout_plan","plan_for"]:
|
| 244 |
st.session_state.pop(k, None)
|
| 245 |
st.switch_page("app.py")
|
| 246 |
-
st.markdown("</div>", unsafe_allow_html=True)
|
| 247 |
|
| 248 |
# ββ HERO BANNER ββ
|
| 249 |
bmi_label = f"{bmi:.1f} Β· {category}"
|
|
@@ -386,19 +379,17 @@ st.markdown("<br>", unsafe_allow_html=True)
|
|
| 386 |
ca, cb, cc = st.columns(3)
|
| 387 |
with ca:
|
| 388 |
st.markdown("<div class='regen-btn'>", unsafe_allow_html=True)
|
| 389 |
-
if st.button("β‘ Regenerate Plan", use_container_width=True):
|
| 390 |
st.session_state.pop("workout_plan", None)
|
| 391 |
st.session_state.pop("plan_for", None)
|
| 392 |
st.rerun()
|
| 393 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 394 |
with cb:
|
| 395 |
-
if st.button("βοΈ Edit Profile", use_container_width=True):
|
| 396 |
st.switch_page("pages/1_Profile.py")
|
| 397 |
with cc:
|
| 398 |
-
st.
|
| 399 |
-
if st.button("πͺ Sign Out", use_container_width=True):
|
| 400 |
logout(st.session_state.get("username",""))
|
| 401 |
for k in ["logged_in","username","auth_token","user_data","workout_plan","plan_for"]:
|
| 402 |
st.session_state.pop(k, None)
|
| 403 |
-
st.switch_page("app.py")
|
| 404 |
-
st.markdown("</div>", unsafe_allow_html=True)
|
|
|
|
| 61 |
letter-spacing:2px;color:#fff;line-height:1;margin-bottom:6px;
|
| 62 |
}
|
| 63 |
.plan-hero-title em{color:#E50914;font-style:normal;}
|
| 64 |
+
|
| 65 |
+
/* Subtitle Styling: Bold and Larger */
|
| 66 |
+
.plan-hero-sub{
|
| 67 |
+
font-size:1.1rem;
|
| 68 |
+
color:rgba(255,255,255,0.9);
|
| 69 |
+
font-weight:700;
|
| 70 |
+
margin-top:10px;
|
| 71 |
+
}
|
| 72 |
|
| 73 |
/* βββ STATS ROW βββ */
|
| 74 |
.stats-row{
|
|
|
|
| 164 |
margin:0 3px;
|
| 165 |
}
|
| 166 |
|
| 167 |
+
/* βββ ACTION BUTTONS β RED GLOW STYLE βββ */
|
| 168 |
+
.stButton>button, .regen-btn .stButton>button{
|
| 169 |
+
background:linear-gradient(135deg, #E50914 0%, #a00008 100%)!important;
|
| 170 |
+
border:none!important;
|
| 171 |
+
color:#fff!important;
|
| 172 |
+
border-radius:6px!important;
|
| 173 |
font-family:'DM Sans',sans-serif!important;
|
| 174 |
+
font-size:0.85rem!important;font-weight:700!important;
|
| 175 |
padding:12px 24px!important;
|
|
|
|
| 176 |
letter-spacing:0.5px!important;
|
| 177 |
+
box-shadow: 0 0 15px rgba(229, 9, 20, 0.4)!important;
|
| 178 |
+
animation: button-glow 2s infinite !important;
|
| 179 |
+
transition: all 0.3s ease !important;
|
|
|
|
|
|
|
|
|
|
| 180 |
}
|
| 181 |
|
| 182 |
+
.stButton>button:hover{
|
| 183 |
+
transform:translateY(-2px)!important;
|
| 184 |
+
box-shadow: 0 0 25px rgba(229, 9, 20, 0.7)!important;
|
| 185 |
+
filter: brightness(1.1) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
}
|
| 187 |
|
| 188 |
+
@keyframes button-glow {
|
| 189 |
+
0% { box-shadow: 0 0 5px rgba(229, 9, 20, 0.4); }
|
| 190 |
+
50% { box-shadow: 0 0 20px rgba(229, 9, 20, 0.7); }
|
| 191 |
+
100% { box-shadow: 0 0 5px rgba(229, 9, 20, 0.4); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
}
|
| 193 |
|
| 194 |
/* βββ SPINNER βββ */
|
|
|
|
| 220 |
equipment=data["equipment"]
|
| 221 |
)
|
| 222 |
|
| 223 |
+
# ββ TOPNAV RESTRUCTURED ββ
|
| 224 |
+
c1, c2 = st.columns([5,1])
|
| 225 |
with c1:
|
| 226 |
+
st.markdown(f"""
|
| 227 |
+
<div style='margin-bottom: -12px;'>
|
| 228 |
+
<span class='nav-logo'>β‘ FitPlan Pro</span>
|
| 229 |
+
</div>
|
| 230 |
+
<div style='padding-top:4px; font-size:0.82rem; color:rgba(255,255,255,0.4); margin-left:2px;'>
|
| 231 |
+
Logged in as <strong style='color:#fff'>{uname}</strong>
|
| 232 |
+
</div>
|
| 233 |
+
""", unsafe_allow_html=True)
|
| 234 |
with c2:
|
| 235 |
+
if st.button("Sign Out", key="nav_logout", use_container_width=True):
|
|
|
|
|
|
|
|
|
|
| 236 |
logout(st.session_state.get("username",""))
|
| 237 |
for k in ["logged_in","username","auth_token","user_data","workout_plan","plan_for"]:
|
| 238 |
st.session_state.pop(k, None)
|
| 239 |
st.switch_page("app.py")
|
|
|
|
| 240 |
|
| 241 |
# ββ HERO BANNER ββ
|
| 242 |
bmi_label = f"{bmi:.1f} Β· {category}"
|
|
|
|
| 379 |
ca, cb, cc = st.columns(3)
|
| 380 |
with ca:
|
| 381 |
st.markdown("<div class='regen-btn'>", unsafe_allow_html=True)
|
| 382 |
+
if st.button("β‘ Regenerate Plan", key="regen_btn", use_container_width=True):
|
| 383 |
st.session_state.pop("workout_plan", None)
|
| 384 |
st.session_state.pop("plan_for", None)
|
| 385 |
st.rerun()
|
| 386 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 387 |
with cb:
|
| 388 |
+
if st.button("βοΈ Edit Profile", key="edit_profile", use_container_width=True):
|
| 389 |
st.switch_page("pages/1_Profile.py")
|
| 390 |
with cc:
|
| 391 |
+
if st.button("πͺ Sign Out", key="footer_logout", use_container_width=True):
|
|
|
|
| 392 |
logout(st.session_state.get("username",""))
|
| 393 |
for k in ["logged_in","username","auth_token","user_data","workout_plan","plan_for"]:
|
| 394 |
st.session_state.pop(k, None)
|
| 395 |
+
st.switch_page("app.py")
|
|
|