GSMEthesis commited on
Commit
c953ac0
·
verified ·
1 Parent(s): 59f9108

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -763,10 +763,11 @@ def enhanced_likert_scale(question_data):
763
  position: relative;
764
  display: flex;
765
  justify-content: space-between;
 
766
  }}
767
  .likert-dot {{
768
- width: 20px;
769
- height: 20px;
770
  border-radius: 50%;
771
  background: white;
772
  border: 2px solid #6a0dad;
@@ -785,7 +786,7 @@ def enhanced_likert_scale(question_data):
785
  margin: 5px auto 20px;
786
  display: flex;
787
  justify-content: space-between;
788
- direction: ltr; /* تغییر جهت برای برعکس کردن */
789
  }}
790
  .likert-value {{
791
  text-align: center;
@@ -793,9 +794,12 @@ def enhanced_likert_scale(question_data):
793
  color: #6a0dad;
794
  font-weight: bold;
795
  }}
796
- /* مخفی کردن دکمه‌ها */
797
  .likert-button {{
798
  visibility: hidden;
 
 
 
799
  }}
800
  @media (max-width: 768px) {{
801
  .likert-line {{
@@ -844,7 +848,7 @@ def enhanced_likert_scale(question_data):
844
  </script>
845
  """, height=80)
846
 
847
- # دکمه‌های واقعی (مخفی)
848
  btn_cols = st.columns(scale)
849
  for i in range(scale):
850
  with btn_cols[i]:
@@ -853,7 +857,7 @@ def enhanced_likert_scale(question_data):
853
  str(value),
854
  key=f"{key}_btn_{value}",
855
  type="primary" if st.session_state.get(key) == value else "secondary",
856
- help="این دکمه‌ها مخفی هستند" # افزودن پیام راهنما
857
  ):
858
  st.session_state[key] = value
859
  st.rerun()
 
763
  position: relative;
764
  display: flex;
765
  justify-content: space-between;
766
+ direction: rtl; /* تغییر جهت از راست به چپ */
767
  }}
768
  .likert-dot {{
769
+ width: 18px; /* اندازه دکمه‌ها کوچک‌تر شد */
770
+ height: 18px; /* اندازه دکمه‌ها کوچک‌تر شد */
771
  border-radius: 50%;
772
  background: white;
773
  border: 2px solid #6a0dad;
 
786
  margin: 5px auto 20px;
787
  display: flex;
788
  justify-content: space-between;
789
+ direction: rtl; /* جهت لیبل‌ها باید از راست به چپ باشد */
790
  }}
791
  .likert-value {{
792
  text-align: center;
 
794
  color: #6a0dad;
795
  font-weight: bold;
796
  }}
797
+ /* مخفی کردن دکمه‌ها با اندازه کوچک */
798
  .likert-button {{
799
  visibility: hidden;
800
+ width: 12px;
801
+ height: 12px;
802
+ margin: 2px; /* فاصله کم بین دکمه‌ها */
803
  }}
804
  @media (max-width: 768px) {{
805
  .likert-line {{
 
848
  </script>
849
  """, height=80)
850
 
851
+ # دکمه‌های واقعی (مخفی و کوچک)
852
  btn_cols = st.columns(scale)
853
  for i in range(scale):
854
  with btn_cols[i]:
 
857
  str(value),
858
  key=f"{key}_btn_{value}",
859
  type="primary" if st.session_state.get(key) == value else "secondary",
860
+ help="این دکمه‌ها مخفی هستند" # پیام راهنما
861
  ):
862
  st.session_state[key] = value
863
  st.rerun()