NSamson1 commited on
Commit
65df655
Β·
verified Β·
1 Parent(s): e551255

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +12 -8
src/streamlit_app.py CHANGED
@@ -16,7 +16,7 @@ st.set_page_config(
16
  initial_sidebar_state="expanded"
17
  )
18
 
19
- # COMPLETELY CLEAN CSS - NO ANIMATIONS AT ALL
20
  st.markdown("""
21
  <style>
22
  @import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');
@@ -113,20 +113,24 @@ st.markdown("""
113
  text-align: center;
114
  margin: 10px 0;
115
  }
 
 
 
 
116
  </style>
117
  """, unsafe_allow_html=True)
118
 
119
  # NO JAVASCRIPT FOR ANIMATIONS - completely removed
120
  st.markdown("""
121
  <script>
122
- // Auto progression after completion - ONLY FUNCTIONAL CODE
123
  function startAutoProgression(seconds) {
124
  let timeLeft = seconds;
125
  const countdownElement = document.getElementById('countdown-timer');
126
 
127
  const timer = setInterval(() => {
128
  if (countdownElement) {
129
- countdownElement.textContent = `Next adventure in: ${timeLeft} seconds`;
130
  }
131
  timeLeft--;
132
 
@@ -155,7 +159,7 @@ def initialize_session_state():
155
 
156
  initialize_session_state()
157
 
158
- # COMPLETELY STABLE WELCOME - NO MOVEMENT
159
  st.markdown("""
160
  <div class="main-container">
161
  <div class="animal-characters">
@@ -331,9 +335,9 @@ with col1:
331
  if st.button("🎯 Submit Answer", key=f"submit_{st.session_state.question_index}", use_container_width=True):
332
  st.session_state.last_activity = time.time()
333
  if str(user_ans).strip().lower() == str(question['answer']).strip().lower():
334
- # SIMPLE CELEBRATION - just Streamlit balloons, no CSS animations
335
  st.success("πŸŽ‰βœ¨ CORRECT! Amazing work! βœ¨πŸŽ‰")
336
- st.balloons() # This is the ONLY animation - controlled by Streamlit
337
 
338
  success_messages = [
339
  "🌟 You're a math superstar!",
@@ -395,10 +399,10 @@ with col1:
395
  st.markdown("""
396
  <div class="completion-celebration">
397
  <div style="font-size: 60px; margin-bottom: 20px;">
398
- πŸ†πŸŽ‰
399
  </div>
400
  <h1 style="font-family: 'Comic Neue', cursive;">
401
- CONGRATULATIONS! πŸ…
402
  </h1>
403
  <p style="font-size: 24px;">
404
  You've completed all challenges in this category!
 
16
  initial_sidebar_state="expanded"
17
  )
18
 
19
+ # COMPLETELY CLEAN CSS - NO ANIMATIONS, NO SHAKING, NO MOVEMENT
20
  st.markdown("""
21
  <style>
22
  @import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');
 
113
  text-align: center;
114
  margin: 10px 0;
115
  }
116
+
117
+ /* REMOVED ALL ANIMATION KEYFRAMES */
118
+ /* REMOVED ALL TRANSFORM PROPERTIES */
119
+ /* REMOVED ALL ANIMATION PROPERTIES */
120
  </style>
121
  """, unsafe_allow_html=True)
122
 
123
  # NO JAVASCRIPT FOR ANIMATIONS - completely removed
124
  st.markdown("""
125
  <script>
126
+ // Simple auto progression - NO ANIMATIONS
127
  function startAutoProgression(seconds) {
128
  let timeLeft = seconds;
129
  const countdownElement = document.getElementById('countdown-timer');
130
 
131
  const timer = setInterval(() => {
132
  if (countdownElement) {
133
+ countdownElement.textContent = 'Next adventure in: ' + timeLeft + ' seconds';
134
  }
135
  timeLeft--;
136
 
 
159
 
160
  initialize_session_state()
161
 
162
+ # COMPLETELY STABLE WELCOME - NO MOVEMENT AT ALL
163
  st.markdown("""
164
  <div class="main-container">
165
  <div class="animal-characters">
 
335
  if st.button("🎯 Submit Answer", key=f"submit_{st.session_state.question_index}", use_container_width=True):
336
  st.session_state.last_activity = time.time()
337
  if str(user_ans).strip().lower() == str(question['answer']).strip().lower():
338
+ # SIMPLE CELEBRATION - just Streamlit balloons and message
339
  st.success("πŸŽ‰βœ¨ CORRECT! Amazing work! βœ¨πŸŽ‰")
340
+ st.balloons() # Only Streamlit balloons - no CSS animations
341
 
342
  success_messages = [
343
  "🌟 You're a math superstar!",
 
399
  st.markdown("""
400
  <div class="completion-celebration">
401
  <div style="font-size: 60px; margin-bottom: 20px;">
402
+ πŸ†
403
  </div>
404
  <h1 style="font-family: 'Comic Neue', cursive;">
405
+ CONGRATULATIONS! πŸŽ‰
406
  </h1>
407
  <p style="font-size: 24px;">
408
  You've completed all challenges in this category!