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