Spaces:
Sleeping
Sleeping
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -234,15 +234,14 @@ st.markdown("""
|
|
| 234 |
}
|
| 235 |
|
| 236 |
/* دکمه سبز (ثالث) */
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
.green-btn {
|
| 240 |
-
background-color: #28a745 !important; /* رنگ سبز */
|
| 241 |
color: white !important;
|
| 242 |
border: none !important;
|
| 243 |
border-radius: 8px !important;
|
| 244 |
padding: 10px 20px !important;
|
| 245 |
font-weight: bold !important;
|
|
|
|
| 246 |
}
|
| 247 |
|
| 248 |
|
|
@@ -610,14 +609,23 @@ def attention_check1():
|
|
| 610 |
index=None,
|
| 611 |
key="att1_radio"
|
| 612 |
)
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 621 |
|
| 622 |
def attention_check2():
|
| 623 |
"""سوال توجه دوم (بدون بررسی پاسخ صحیح)"""
|
|
|
|
| 234 |
}
|
| 235 |
|
| 236 |
/* دکمه سبز (ثالث) */
|
| 237 |
+
div[data-testid="stButton"] > button.green-btn {
|
| 238 |
+
background-color: #28a745 !important;
|
|
|
|
|
|
|
| 239 |
color: white !important;
|
| 240 |
border: none !important;
|
| 241 |
border-radius: 8px !important;
|
| 242 |
padding: 10px 20px !important;
|
| 243 |
font-weight: bold !important;
|
| 244 |
+
width: 100% !important;
|
| 245 |
}
|
| 246 |
|
| 247 |
|
|
|
|
| 609 |
index=None,
|
| 610 |
key="att1_radio"
|
| 611 |
)
|
| 612 |
+
|
| 613 |
+
# سپس دکمه را ایجاد کنید
|
| 614 |
+
col1, col2 = st.columns([1, 2])
|
| 615 |
+
with col2:
|
| 616 |
+
btn = st.button("ادامه", key="continue_green")
|
| 617 |
+
if btn:
|
| 618 |
+
st.markdown("""
|
| 619 |
+
<script>
|
| 620 |
+
document.querySelector('[data-testid="stButton"] button').classList.add('green-btn');
|
| 621 |
+
</script>
|
| 622 |
+
""", unsafe_allow_html=True)
|
| 623 |
+
if answer:
|
| 624 |
+
st.session_state.attention_check1 = answer # ذخیره پاسخ در session_state
|
| 625 |
+
st.session_state.current_page = "random_likert_questions"
|
| 626 |
+
st.rerun()
|
| 627 |
+
else:
|
| 628 |
+
st.warning("لطفاً یک گزینه را انتخاب کنید")
|
| 629 |
|
| 630 |
def attention_check2():
|
| 631 |
"""سوال توجه دوم (بدون بررسی پاسخ صحیح)"""
|