GSMEthesis commited on
Commit
8aca709
·
verified ·
1 Parent(s): 5fe84cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +61 -28
app.py CHANGED
@@ -735,55 +735,69 @@ h3 {
735
  line-height: 1.8 !important;
736
  }
737
 
738
- /* استایل برای اسلایدر استاندارد Streamlit */
739
  .stSlider {
740
- direction: ltr !important; /* جلوگیری از بهم‌ریختگی در rtl */
741
  width: 100% !important;
742
  margin: 0 auto !important;
743
  padding: 0 !important;
744
  position: relative !important;
 
745
  }
746
 
747
  .stSlider [role="slider"] {
748
- background-color: #f0e6ff !important; /* رنگ پس‌زمینه مسیر */
749
- height: 10px !important;
750
- border-radius: 5px !important;
751
  width: 100% !important;
752
  position: relative !important;
 
753
  }
754
 
755
  .stSlider [role="slider"]::-webkit-slider-thumb {
756
  background-color: #6a0dad !important; /* رنگ دستگیره */
757
- border: 2px solid #ffffff !important;
758
- width: 20px !important;
759
- height: 20px !important;
760
  border-radius: 50% !important;
761
  cursor: pointer !important;
762
- box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
763
  position: relative !important;
 
 
 
 
 
 
764
  }
765
 
766
  .stSlider [role="slider"]::-moz-range-thumb {
767
  background-color: #6a0dad !important;
768
- border: 2px solid #ffffff !important;
769
- width: 20px !important;
770
- height: 20px !important;
771
  border-radius: 50% !important;
772
  cursor: pointer !important;
773
- box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
774
  position: relative !important;
 
 
 
 
 
 
775
  }
776
 
777
  .stSlider [role="slider"]::-webkit-slider-runnable-track {
778
- background-color: #f0e6ff !important;
779
- height: 10px !important;
780
- border-radius: 5px !important;
781
  }
782
 
783
  .stSlider [role="slider"]::-moz-range-track {
784
- background-color: #f0e6ff !important;
785
- height: 10px !important;
786
- border-radius: 5px !important;
787
  }
788
 
789
  /* اضافه کردن علامت‌های نقاط (ticks) */
@@ -793,29 +807,47 @@ h3 {
793
  .stSlider::before {
794
  content: '';
795
  position: absolute;
796
- top: 10px;
797
  width: 100%;
798
- height: 10px;
799
  pointer-events: none;
800
  background: repeating-linear-gradient(
801
  to right,
802
  #6a0dad 0,
803
- #6a0dad 2px,
804
- transparent 2px,
805
  transparent 14.28%
806
  );
 
807
  }
808
 
809
- /* استایل برای لیبل‌های اسلایدر */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  .slider-labels {
811
  display: flex !important;
812
  justify-content: space-between !important;
813
- font-size: 12px !important;
814
- margin-bottom: 5px !important;
 
815
  color: #333333 !important;
816
  font-family: 'B Nazanin' !important;
817
- direction: rtl !important;
818
  width: 100% !important;
 
819
  }
820
 
821
  /* استایل برای متن پاسخ انتخاب‌شده */
@@ -823,7 +855,8 @@ h3 {
823
  text-align: center !important;
824
  color: #6a0dad !important;
825
  font-weight: bold !important;
826
- margin-top: 10px !important;
 
827
  font-family: 'B Nazanin' !important;
828
  direction: rtl !important;
829
  }
 
735
  line-height: 1.8 !important;
736
  }
737
 
738
+ /* استایل برای اسلایدر استاندارد Streamlit (فلیپ‌شده) */
739
  .stSlider {
740
+ direction: ltr !important; /* حفظ ltr برای اسلایدر */
741
  width: 100% !important;
742
  margin: 0 auto !important;
743
  padding: 0 !important;
744
  position: relative !important;
745
+ transform: scaleX(-1) !important; /* فلیپ کردن اسلایدر */
746
  }
747
 
748
  .stSlider [role="slider"] {
749
+ background-color: #e6e6fa !important; /* رنگ پس‌زمینه مسیر */
750
+ height: 12px !important;
751
+ border-radius: 6px !important;
752
  width: 100% !important;
753
  position: relative !important;
754
+ transform: scaleX(-1) !important; /* معکوس کردن مسیر */
755
  }
756
 
757
  .stSlider [role="slider"]::-webkit-slider-thumb {
758
  background-color: #6a0dad !important; /* رنگ دستگیره */
759
+ border: 3px solid #ffffff !important;
760
+ width: 24px !important;
761
+ height: 24px !important;
762
  border-radius: 50% !important;
763
  cursor: pointer !important;
764
+ box-shadow: 0 3px 6px rgba(0,0,0,0.3) !important;
765
  position: relative !important;
766
+ transition: transform 0.2s ease !important;
767
+ transform: scaleX(-1) !important; /* معکوس کردن دستگیره */
768
+ }
769
+
770
+ .stSlider [role="slider"]::-webkit-slider-thumb:hover {
771
+ transform: scaleX(-1) scale(1.2) !important; /* بزرگ شدن موقع هاور */
772
  }
773
 
774
  .stSlider [role="slider"]::-moz-range-thumb {
775
  background-color: #6a0dad !important;
776
+ border: 3px solid #ffffff !important;
777
+ width: 24px !important;
778
+ height: 24px !important;
779
  border-radius: 50% !important;
780
  cursor: pointer !important;
781
+ box-shadow: 0 3px 6px rgba(0,0,0,0.3) !important;
782
  position: relative !important;
783
+ transition: transform 0.2s ease !important;
784
+ transform: scaleX(-1) !important;
785
+ }
786
+
787
+ .stSlider [role="slider"]::-moz-range-thumb:hover {
788
+ transform: scaleX(-1) scale(1.2) !important;
789
  }
790
 
791
  .stSlider [role="slider"]::-webkit-slider-runnable-track {
792
+ background-color: #e6e6fa !important;
793
+ height: 12px !important;
794
+ border-radius: 6px !important;
795
  }
796
 
797
  .stSlider [role="slider"]::-moz-range-track {
798
+ background-color: #e6e6fa !important;
799
+ height: 12px !important;
800
+ border-radius: 6px !important;
801
  }
802
 
803
  /* اضافه کردن علامت‌های نقاط (ticks) */
 
807
  .stSlider::before {
808
  content: '';
809
  position: absolute;
810
+ top: 12px;
811
  width: 100%;
812
+ height: 12px;
813
  pointer-events: none;
814
  background: repeating-linear-gradient(
815
  to right,
816
  #6a0dad 0,
817
+ #6a0dad 3px,
818
+ transparent 3px,
819
  transparent 14.28%
820
  );
821
+ transform: scaleX(-1) !important; /* معکوس کردن ticks */
822
  }
823
 
824
+ /* اضافه کردن اعداد زیر نقاط (۷ تا ۱) */
825
+ .stSlider::after {
826
+ content: '7 6 5 4 3 2 1';
827
+ position: absolute;
828
+ top: 28px;
829
+ width: 100%;
830
+ display: flex;
831
+ justify-content: space-between;
832
+ font-size: 12px !important;
833
+ color: #333333 !important;
834
+ font-family: 'B Nazanin' !important;
835
+ direction: ltr !important;
836
+ transform: scaleX(-1) !important; /* معکوس کردن اعداد */
837
+ }
838
+
839
+ /* استایل برای لیبل‌های اسلایدر (هماهنگ با فلیپ) */
840
  .slider-labels {
841
  display: flex !important;
842
  justify-content: space-between !important;
843
+ font-size: 14px !important;
844
+ font-weight: bold !important;
845
+ margin-bottom: 8px !important;
846
  color: #333333 !important;
847
  font-family: 'B Nazanin' !important;
848
+ direction: ltr !important; /* هماهنگی با اسلایدر فلیپ‌شده */
849
  width: 100% !important;
850
+ transform: scaleX(-1) !important; /* فلیپ کردن لیبل‌ها */
851
  }
852
 
853
  /* استایل برای متن پاسخ انتخاب‌شده */
 
855
  text-align: center !important;
856
  color: #6a0dad !important;
857
  font-weight: bold !important;
858
+ font-size: 16px !important;
859
+ margin-top: 12px !important;
860
  font-family: 'B Nazanin' !important;
861
  direction: rtl !important;
862
  }