Spaces:
Paused

GSMEthesis commited on
Commit
fa29613
·
verified ·
1 Parent(s): cdb79e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -46
app.py CHANGED
@@ -752,55 +752,31 @@ def enhanced_likert_scale(question_data):
752
  # استایل‌دهی پیشرفته
753
  st.markdown(f"""
754
  <style>
755
- /* استایل پایه برای دکمه‌ها */
756
- div[data-testid="stHorizontalBlock"] {{
757
- justify-content: center !important;
758
- flex-wrap: wrap !important;
759
- gap: 0.5rem !important;
 
760
  }}
761
-
762
- /* دکمه‌های گرد */
763
- button[data-testid="baseButton-secondary"],
764
- button[data-testid="baseButton-primary"] {{
765
- width: 30px !important;
766
- height: 30px !important;
767
- border-radius: 50% !important;
768
- padding: 0 !important;
769
- min-width: auto !important;
770
- margin: 0 !important;
771
- transition: all 0.3s !important;
772
- }}
773
-
774
- /* دکمه انتخاب نشده */
775
- button[data-testid="baseButton-secondary"] {{
776
- border: 2px solid #6a0dad !important;
777
- background: white !important;
778
- color: transparent !important;
779
  }}
780
-
781
- /* دکمه انتخاب شده */
782
- button[data-testid="baseButton-primary"] {{
783
- background: #6a0dad !important;
784
- border: 2px solid #6a0dad !important;
785
- color: white !important;
786
  }}
787
-
788
- /* حالت hover */
789
- button[data-testid="baseButton-secondary"]:hover {{
790
- background: #f0e6ff !important;
791
- transform: scale(1.1) !important;
792
- }}
793
-
794
- /* نمایش موبایل */
795
- @media (max-width: 768px) {{
796
- div[data-testid="stHorizontalBlock"] {{
797
- gap: 0.3rem !important;
798
- }}
799
- button[data-testid="baseButton-secondary"],
800
- button[data-testid="baseButton-primary"] {{
801
- width: 28px !important;
802
- height: 28px !important;
803
- }}
804
  }}
805
  </style>
806
  """, unsafe_allow_html=True)
 
752
  # استایل‌دهی پیشرفته
753
  st.markdown(f"""
754
  <style>
755
+ .likert-btn-container {{
756
+ display: flex;
757
+ justify-content: center;
758
+ gap: 8px;
759
+ margin: 10px 0;
760
+ flex-wrap: wrap;
761
  }}
762
+ .likert-btn {{
763
+ width: 32px;
764
+ height: 32px;
765
+ border-radius: 50%;
766
+ border: 2px solid #6a0dad;
767
+ display: flex;
768
+ align-items: center;
769
+ justify-content: center;
770
+ cursor: pointer;
771
+ margin: 0 2px;
 
 
 
 
 
 
 
 
772
  }}
773
+ .likert-btn-unselected {{
774
+ background: white;
775
+ color: #6a0dad;
 
 
 
776
  }}
777
+ .likert-btn-selected {{
778
+ background: #6a0dad;
779
+ color: white;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
780
  }}
781
  </style>
782
  """, unsafe_allow_html=True)