Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -752,29 +752,33 @@ def enhanced_likert_scale(question_data):
|
|
| 752 |
# استایلدهی با HTML - غیرفعال کردن استایلهای پیشفرض دکمهها
|
| 753 |
st.markdown(f"""
|
| 754 |
<style>
|
| 755 |
-
/*
|
| 756 |
-
.stButton>button {{
|
| 757 |
all: unset;
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
|
| 761 |
-
|
| 762 |
-
|
| 763 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 764 |
cursor: pointer;
|
|
|
|
|
|
|
| 765 |
}}
|
| 766 |
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
background: none !important;
|
| 771 |
-
border: none !important;
|
| 772 |
-
box-shadow: none !important;
|
| 773 |
}}
|
| 774 |
|
| 775 |
-
/*
|
| 776 |
-
.stButton>button>div>p {{
|
| 777 |
-
|
|
|
|
| 778 |
}}
|
| 779 |
</style>
|
| 780 |
""", unsafe_allow_html=True)
|
|
|
|
| 752 |
# استایلدهی با HTML - غیرفعال کردن استایلهای پیشفرض دکمهها
|
| 753 |
st.markdown(f"""
|
| 754 |
<style>
|
| 755 |
+
/* استایلهای اختصاصی فقط برای دکمههای لیکرت */
|
| 756 |
+
div[data-testid="column"] .stButton > button {{
|
| 757 |
all: unset;
|
| 758 |
+
width: 40px;
|
| 759 |
+
height: 40px;
|
| 760 |
+
border-radius: 50%;
|
| 761 |
+
border: 2px solid #6a0dad !important;
|
| 762 |
+
background: { "#6a0dad" if st.session_state[key] is not None else "white" } !important;
|
| 763 |
+
color: { "white" if st.session_state[key] is not None else "#6a0dad" } !important;
|
| 764 |
+
font-weight: bold;
|
| 765 |
+
display: flex;
|
| 766 |
+
align-items: center;
|
| 767 |
+
justify-content: center;
|
| 768 |
cursor: pointer;
|
| 769 |
+
transition: all 0.3s;
|
| 770 |
+
margin: 0 auto;
|
| 771 |
}}
|
| 772 |
|
| 773 |
+
div[data-testid="column"] .stButton > button:hover {{
|
| 774 |
+
transform: scale(1.1);
|
| 775 |
+
background: #f0e6ff !important;
|
|
|
|
|
|
|
|
|
|
| 776 |
}}
|
| 777 |
|
| 778 |
+
/* فقط برای دکمههای انتخاب شده */
|
| 779 |
+
div[data-testid="column"] .stButton > button:has(> div > p:contains('•')) {{
|
| 780 |
+
background: #6a0dad !important;
|
| 781 |
+
color: white !important;
|
| 782 |
}}
|
| 783 |
</style>
|
| 784 |
""", unsafe_allow_html=True)
|