Maryam Ilka commited on
Commit
c25bba9
·
verified ·
1 Parent(s): d694f06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -5
app.py CHANGED
@@ -584,15 +584,25 @@ def attention_check1():
584
  """سوال توجه اول (بدون بررسی پاسخ صحیح)"""
585
  st.markdown("""
586
  <style>
587
- /* تضمین رنگ متن برای تمام سطوح */
588
- .st-ec, .st-ed, .st-ee, .st-ef, .st-eg, .st-eh, .st-ei, .st-ej {
589
- color: black !important;
 
 
 
 
 
 
 
 
 
 
590
  }
591
  </style>
592
  """, unsafe_allow_html=True)
 
593
  st.markdown("### سوال توجه")
594
 
595
- # استفاده از st.radio با key منحصر به فرد
596
  answer = st.radio(
597
  "رنگ سازمانی اپلیکیشن رهیار چه رنگی بود؟",
598
  ["قرمز", "سبز", "بنفش", "آبی", "زرد"],
@@ -600,9 +610,18 @@ def attention_check1():
600
  key="att1_radio"
601
  )
602
 
 
603
  if st.button("ادامه", key="att1_btn"):
 
 
 
 
 
 
 
 
604
  if answer:
605
- st.session_state.attention_check1 = answer # ذخیره پاسخ در session_state
606
  st.session_state.current_page = "random_likert_questions"
607
  st.rerun()
608
  else:
 
584
  """سوال توجه اول (بدون بررسی پاسخ صحیح)"""
585
  st.markdown("""
586
  <style>
587
+ /* استایل دکمه سبز اختصاصی */
588
+ .green-btn {
589
+ background-color: #28a745 !important;
590
+ color: white !important;
591
+ border: none !important;
592
+ border-radius: 8px !important;
593
+ padding: 10px 20px !important;
594
+ font-weight: bold !important;
595
+ width: 100% !important;
596
+ margin-top: 15px !important;
597
+ }
598
+ .green-btn:hover {
599
+ background-color: #218838 !important;
600
  }
601
  </style>
602
  """, unsafe_allow_html=True)
603
+
604
  st.markdown("### سوال توجه")
605
 
 
606
  answer = st.radio(
607
  "رنگ سازمانی اپلیکیشن رهیار چه رنگی بود؟",
608
  ["قرمز", "سبز", "بنفش", "آبی", "زرد"],
 
610
  key="att1_radio"
611
  )
612
 
613
+ # دکمه سبز اختصاصی
614
  if st.button("ادامه", key="att1_btn"):
615
+ st.markdown("""
616
+ <style>
617
+ div[data-testid="stButton"] > button[kind="primary"] {
618
+ background-color: #28a745 !important;
619
+ }
620
+ </style>
621
+ """, unsafe_allow_html=True)
622
+
623
  if answer:
624
+ st.session_state.attention_check1 = answer
625
  st.session_state.current_page = "random_likert_questions"
626
  st.rerun()
627
  else: