Maryam Ilka commited on
Commit
e928302
·
verified ·
1 Parent(s): 45a623d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -1
app.py CHANGED
@@ -233,6 +233,32 @@ st.markdown("""
233
  font-weight: bold !important;
234
  }
235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
 
237
  /* ========== استایل تضمینی برای گزینه‌های رادیویی ========== */
238
  /* تمام سطوح لیبل‌ها */
@@ -599,7 +625,9 @@ def attention_check1():
599
  key="att1_radio"
600
  )
601
 
602
- if st.button("ادامه", key="att1_btn"):
 
 
603
  if answer:
604
  st.session_state.attention_check1 = answer # ذخیره پاسخ در session_state
605
  st.session_state.current_page = "random_likert_questions"
 
233
  font-weight: bold !important;
234
  }
235
 
236
+ /* دکمه سبز (ثالث) */
237
+ .stButton>button.green-btn,
238
+ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button.green-btn {
239
+ background-color: #28a745 !important; /* رنگ سبز */
240
+ color: white !important;
241
+ border: none !important;
242
+ border-radius: 8px !important;
243
+ padding: 10px 20px !important;
244
+ font-weight: bold !important;
245
+ transition: all 0.3s ease !important;
246
+ }
247
+
248
+ /* حالت hover برای دکمه سبز */
249
+ .stButton>button.green-btn:hover,
250
+ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button.green-btn:hover {
251
+ background-color: #218838 !important; /* رنگ سبز تیره‌تر برای حالت hover */
252
+ transform: translateY(-1px);
253
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
254
+ }
255
+
256
+ /* حالت فعال (فشرده شده) */
257
+ .stButton>button.green-btn:active,
258
+ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button.green-btn:active {
259
+ transform: translateY(0);
260
+ }
261
+
262
 
263
  /* ========== استایل تضمینی برای گزینه‌های رادیویی ========== */
264
  /* تمام سطوح لیبل‌ها */
 
625
  key="att1_radio"
626
  )
627
 
628
+ if st.button("ادامه", key="continue_green", type="primary", help="ادامه فرآیند",
629
+ use_container_width=True,
630
+ kwargs={"class": "green-btn"}):
631
  if answer:
632
  st.session_state.attention_check1 = answer # ذخیره پاسخ در session_state
633
  st.session_state.current_page = "random_likert_questions"