GSMEthesis commited on
Commit
365cc3b
·
verified ·
1 Parent(s): 00299f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -21
app.py CHANGED
@@ -777,42 +777,38 @@ def enhanced_likert_scale(question_data):
777
  .likert-buttons {{
778
  display: flex !important;
779
  justify-content: center !important;
780
- gap: 8px !important;
781
  flex-wrap: wrap !important;
782
  margin: 0 !important;
783
  padding: 0 !important;
 
784
  }}
785
  /* استایل دکمه‌های Streamlit */
786
  div.stButton > button[key^="streamlit-btn-{key}-"] {{
787
- width: 40px !important;
788
- height: 40px !important;
789
  border-radius: 50% !important;
790
- border: 2px solid #6a0dad !important;
791
  background: white !important;
792
- display: flex !important;
793
- align-items: center !important;
794
- justify-content: center !important;
795
- font-size: 18px !important;
796
- color: #6a0dad !important;
797
  padding: 0 !important;
798
  margin: 0 !important;
799
- transition: all 0.3s ease !important;
 
800
  }}
801
  div.stButton > button[key^="streamlit-btn-{key}-"]:hover {{
802
- background: #f0e6ff !important;
803
- transform: scale(1.1) !important;
804
  }}
805
  div.stButton > button[key^="streamlit-btn-{key}-"]:focus,
806
  div.stButton > button[key^="streamlit-btn-{key}-"]:active {{
807
- background: #6a0dad !important;
808
  color: white !important;
809
- box-shadow: 0 0 10px rgba(106, 13, 173, 0.5) !important;
810
  }}
811
  /* استایل دکمه انتخاب‌شده */
812
  div.stButton > button[key="streamlit-btn-{key}-{st.session_state[key] if st.session_state[key] else 'none'}"] {{
813
- background: #6a0dad !important;
814
  color: white !important;
815
- box-shadow: 0 0 10px rgba(106, 13, 173, 0.5) !important;
816
  }}
817
  /* استایل پاسخ */
818
  .likert-response {{
@@ -825,12 +821,12 @@ def enhanced_likert_scale(question_data):
825
  /* ریسپانسیو کردن */
826
  @media (max-width: 600px) {{
827
  .likert-buttons {{
828
- gap: 4px !important;
829
  }}
830
  div.stButton > button[key^="streamlit-btn-{key}-"] {{
831
- width: 36px !important;
832
- height: 36px !important;
833
- font-size: 16px !important;
834
  }}
835
  }}
836
  </style>
@@ -843,7 +839,7 @@ def enhanced_likert_scale(question_data):
843
 
844
  # نمایش لیبل‌ها
845
  st.markdown(
846
- f'<div class="likert-labels"><span style="text-align:right">{labels[0]}</span><span style="text-align:left">{labels[1]}</span></div>',
847
  unsafe_allow_html=True
848
  )
849
 
 
777
  .likert-buttons {{
778
  display: flex !important;
779
  justify-content: center !important;
780
+ gap: 4px !important;
781
  flex-wrap: wrap !important;
782
  margin: 0 !important;
783
  padding: 0 !important;
784
+ align-items: center !important;
785
  }}
786
  /* استایل دکمه‌های Streamlit */
787
  div.stButton > button[key^="streamlit-btn-{key}-"] {{
788
+ width: 20px !important;
789
+ height: 20px !important;
790
  border-radius: 50% !important;
 
791
  background: white !important;
792
+ border: none !important;
793
+ color: black !important;
794
+ font-size: 14px !important;
 
 
795
  padding: 0 !important;
796
  margin: 0 !important;
797
+ box-shadow: none !important;
798
+ outline: none !important;
799
  }}
800
  div.stButton > button[key^="streamlit-btn-{key}-"]:hover {{
801
+ background: #e0e0e0 !important;
 
802
  }}
803
  div.stButton > button[key^="streamlit-btn-{key}-"]:focus,
804
  div.stButton > button[key^="streamlit-btn-{key}-"]:active {{
805
+ background: black !important;
806
  color: white !important;
 
807
  }}
808
  /* استایل دکمه انتخاب‌شده */
809
  div.stButton > button[key="streamlit-btn-{key}-{st.session_state[key] if st.session_state[key] else 'none'}"] {{
810
+ background: black !important;
811
  color: white !important;
 
812
  }}
813
  /* استایل پاسخ */
814
  .likert-response {{
 
821
  /* ریسپانسیو کردن */
822
  @media (max-width: 600px) {{
823
  .likert-buttons {{
824
+ gap: 2px !important;
825
  }}
826
  div.stButton > button[key^="streamlit-btn-{key}-"] {{
827
+ width: 18px !important;
828
+ height: 18px !important;
829
+ font-size: 12px !important;
830
  }}
831
  }}
832
  </style>
 
839
 
840
  # نمایش لیبل‌ها
841
  st.markdown(
842
+ f'<div class="likert-labels"><span style="text-align:right">{labels[1]}</span><span style="text-align:left">{labels[0]}</span></div>',
843
  unsafe_allow_html=True
844
  )
845