GSMEthesis commited on
Commit
a70307b
·
verified ·
1 Parent(s): 4e86e99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -19
app.py CHANGED
@@ -752,56 +752,70 @@ def enhanced_likert_scale(question_data):
752
  # استایل‌دهی با HTML و CSS
753
  html_styles = f"""
754
  <style>
755
- /* بازنشانی استایل‌های پیش‌فرض */
756
  .likert-container {{
757
- font-family: 'Arial', sans-serif;
758
  direction: rtl;
759
- text-align: center;
760
- margin: 20px 0;
761
  }}
762
  .likert-question {{
 
763
  font-size: 18px;
764
  font-weight: bold;
 
765
  margin-bottom: 15px;
 
766
  }}
767
  .likert-labels {{
768
  display: flex;
769
  justify-content: space-between;
 
 
770
  font-size: 14px;
771
- margin-bottom: 10px;
772
  }}
773
  .likert-buttons {{
774
  display: flex;
775
  justify-content: center;
776
- gap: 8px;
777
- flex-wrap: wrap;
778
- margin: 10px 0;
779
  }}
780
  .likert-btn {{
781
- width: 32px;
782
- height: 32px;
783
  border-radius: 50%;
784
  border: 2px solid #6a0dad;
785
  background: white;
 
 
 
 
786
  display: flex;
787
  align-items: center;
788
  justify-content: center;
789
  cursor: pointer;
790
- font-size: 0;
791
- transition: all 0.2s ease;
 
 
 
 
792
  }}
793
  .likert-btn.selected {{
794
  background: #6a0dad;
795
- }}
796
- .likert-btn.selected::after {{
797
- content: '•';
798
  color: white;
799
- font-size: 18px;
800
  }}
801
- .likert-btn:not(.selected)::after {{
802
- content: '○';
 
 
803
  color: #6a0dad;
804
- font-size: 18px;
 
 
 
 
 
 
805
  }}
806
  </style>
807
  """
 
752
  # استایل‌دهی با HTML و CSS
753
  html_styles = f"""
754
  <style>
 
755
  .likert-container {{
 
756
  direction: rtl;
757
+ margin-bottom: 25px;
 
758
  }}
759
  .likert-question {{
760
+ font-family: 'B Nazanin';
761
  font-size: 18px;
762
  font-weight: bold;
763
+ text-align: center;
764
  margin-bottom: 15px;
765
+ color: #333;
766
  }}
767
  .likert-labels {{
768
  display: flex;
769
  justify-content: space-between;
770
+ margin-bottom: 8px;
771
+ font-family: 'B Nazanin';
772
  font-size: 14px;
773
+ color: #555;
774
  }}
775
  .likert-buttons {{
776
  display: flex;
777
  justify-content: center;
778
+ gap: 5px;
779
+ margin-bottom: 10px;
 
780
  }}
781
  .likert-btn {{
782
+ width: 42px;
783
+ height: 42px;
784
  border-radius: 50%;
785
  border: 2px solid #6a0dad;
786
  background: white;
787
+ color: #6a0dad;
788
+ font-family: 'B Nazanin';
789
+ font-weight: bold;
790
+ font-size: 16px;
791
  display: flex;
792
  align-items: center;
793
  justify-content: center;
794
  cursor: pointer;
795
+ transition: all 0.3s ease;
796
+ margin: 0 2px;
797
+ }}
798
+ .likert-btn:hover {{
799
+ background: #f0e6ff;
800
+ transform: scale(1.05);
801
  }}
802
  .likert-btn.selected {{
803
  background: #6a0dad;
 
 
 
804
  color: white;
805
+ box-shadow: 0 0 10px rgba(106,13,173,0.5);
806
  }}
807
+ .likert-selected-value {{
808
+ text-align: center;
809
+ font-family: 'B Nazanin';
810
+ font-size: 16px;
811
  color: #6a0dad;
812
+ font-weight: bold;
813
+ margin-top: 10px;
814
+ padding: 8px;
815
+ background: #f8f0ff;
816
+ border-radius: 8px;
817
+ display: inline-block;
818
+ min-width: 200px;
819
  }}
820
  </style>
821
  """