Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,8 +31,6 @@ st.markdown("""
|
|
| 31 |
--border: #dddddd;
|
| 32 |
--input-bg: #ffffff;
|
| 33 |
--secondary-bg: #f8f9fa;
|
| 34 |
-
--green: #f0ff0;
|
| 35 |
-
--dgreen: #006400
|
| 36 |
}
|
| 37 |
|
| 38 |
* {
|
|
@@ -41,159 +39,61 @@ st.markdown("""
|
|
| 41 |
direction: rtl !important;
|
| 42 |
}
|
| 43 |
|
| 44 |
-
/* تنظیمات اصلی */
|
| 45 |
body, .stApp, [data-testid="stAppViewContainer"] {
|
| 46 |
background-color: var(--background) !important;
|
| 47 |
color: var(--text) !important;
|
| 48 |
}
|
| 49 |
|
| 50 |
-
/*
|
| 51 |
-
.
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
.rahyar-subtitle {
|
| 57 |
-
color: var(--primary) !important;
|
| 58 |
-
margin: 0 !important;
|
| 59 |
-
font-size: 14px !important;
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
/* توضیحات */
|
| 63 |
-
.explanation-title {
|
| 64 |
-
color: var(--primary) !important;
|
| 65 |
-
font-weight: bold !important;
|
| 66 |
-
margin: 20px 0 10px 0 !important;
|
| 67 |
-
font-size: 18px !important;
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
.explanation-item {
|
| 71 |
background-color: var(--secondary-bg) !important;
|
| 72 |
-
border-radius: 8px !important;
|
| 73 |
-
padding: 12px 15px !important;
|
| 74 |
-
margin: 8px 0 !important;
|
| 75 |
-
border-right: 3px solid var(--primary) !important;
|
| 76 |
}
|
| 77 |
|
| 78 |
-
/*
|
| 79 |
-
/* استایل پایه برای تمام عناصر ورودی */
|
| 80 |
.stTextInput input,
|
| 81 |
.stNumberInput input,
|
| 82 |
.stSelectbox select,
|
| 83 |
-
.stTextArea textarea
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > div > div > input,
|
| 88 |
-
/* لیست dropdown */
|
| 89 |
-
.st-bq, .st-br, .st-bs, .st-bt, .st-bu, .st-bv, .st-bw, .st-bx, .st-by, .st-bz {
|
| 90 |
-
color: var(--text) !important;
|
| 91 |
background-color: var(--input-bg) !important;
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
/* استایل لیبلها */
|
| 96 |
.stTextInput > label,
|
| 97 |
.stNumberInput > label,
|
| 98 |
.stSelectbox > label,
|
| 99 |
-
.stRadio > label
|
| 100 |
-
.stSlider > label {
|
| 101 |
color: var(--text) !important;
|
| 102 |
font-weight: bold !important;
|
| 103 |
-
margin-bottom:
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
/* استایل placeholder */
|
| 107 |
-
::placeholder {
|
| 108 |
-
color: var(--text) !important;
|
| 109 |
-
opacity: 0.7 !important;
|
| 110 |
-
}
|
| 111 |
-
|
| 112 |
-
/* ========== استایلهای خاص Selectbox ========== */
|
| 113 |
-
/* حذف کامل فلش پیشفرض در تمام مرورگرها */
|
| 114 |
-
|
| 115 |
-
div[data-baseweb="select"] > div:first-child {
|
| 116 |
-
-webkit-appearance: none !important;
|
| 117 |
-
-moz-appearance: none !important;
|
| 118 |
-
appearance: none !important;
|
| 119 |
-
background-image: none !important;
|
| 120 |
-
}
|
| 121 |
-
|
| 122 |
-
/* برای اینترنت اکسپلورر */
|
| 123 |
-
div[data-baseweb="select"] > div:first-child::-ms-expand {
|
| 124 |
-
display: none !important;
|
| 125 |
}
|
| 126 |
-
|
| 127 |
-
/* ایجاد فلش سفارشی */
|
| 128 |
-
div[data-baseweb="select"] {
|
| 129 |
-
position: relative;
|
| 130 |
-
}
|
| 131 |
-
|
| 132 |
-
div[data-baseweb="select"]::after {
|
| 133 |
-
content: "▼";
|
| 134 |
-
position: absolute;
|
| 135 |
-
left: 8px;
|
| 136 |
-
top: 50%;
|
| 137 |
-
transform: translateY(-50%);
|
| 138 |
-
color: var(--primary);
|
| 139 |
-
background-color: white !important; /* پسزمینه سفید برای پوشاندن فلش پیشفرض */
|
| 140 |
-
font-size: 14px;
|
| 141 |
-
pointer-events: none;
|
| 142 |
-
}
|
| 143 |
-
|
| 144 |
|
| 145 |
-
/*
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
div[data-baseweb="popover"] [role="option"] {
|
| 149 |
-
color: var(--text) !important;
|
| 150 |
background-color: white !important;
|
| 151 |
-
border: 1px var(--primary) !important;
|
| 152 |
-
}
|
| 153 |
-
|
| 154 |
-
/* آیتم انتخاب شده */
|
| 155 |
-
div[data-baseweb="popover"] [role="option"][aria-selected="true"] {
|
| 156 |
-
background-color: #f0e6ff !important;
|
| 157 |
-
color: black !important;
|
| 158 |
-
}
|
| 159 |
-
|
| 160 |
-
/* ========== استایلهای Number Input ========== */
|
| 161 |
-
.stNumberInput button {
|
| 162 |
-
color: var(--primary) !important;
|
| 163 |
-
background-color: transparent !important;
|
| 164 |
-
border: none !important;
|
| 165 |
-
width: 30px !important;
|
| 166 |
-
font-weight: bold !important;
|
| 167 |
-
}
|
| 168 |
-
|
| 169 |
-
.stNumberInput button:hover {
|
| 170 |
-
background-color: #f0e6ff !important;
|
| 171 |
}
|
| 172 |
-
|
| 173 |
|
| 174 |
-
|
| 175 |
-
.rahyar-header {
|
| 176 |
background-color: var(--primary) !important;
|
| 177 |
-
color:
|
| 178 |
-
|
| 179 |
-
border-radius: 10px !important;
|
| 180 |
-
margin-bottom: 20px !important;
|
| 181 |
-
text-align: center !important;
|
| 182 |
}
|
| 183 |
|
| 184 |
-
.
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
padding: 15px !important;
|
| 188 |
-
margin: 15px 0 !important;
|
| 189 |
-
border-right: 5px solid var(--primary) !important;
|
| 190 |
}
|
| 191 |
|
| 192 |
-
/* دکمه
|
| 193 |
-
.stButton>button,
|
| 194 |
-
[data-testid="baseButton-primary"]
|
| 195 |
-
.accept-btn,
|
| 196 |
-
div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button {
|
| 197 |
background-color: var(--primary) !important;
|
| 198 |
color: white !important;
|
| 199 |
border: none !important;
|
|
@@ -202,95 +102,32 @@ st.markdown("""
|
|
| 202 |
font-weight: bold !important;
|
| 203 |
}
|
| 204 |
|
| 205 |
-
/*
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
.reject-btn {
|
| 209 |
-
background-color: var(--primary) !important;
|
| 210 |
-
color: var(--input-bg) !important;
|
| 211 |
-
border: 1px solid var(--primary) !important;
|
| 212 |
-
border-radius: 8px !important;
|
| 213 |
-
padding: 10px 20px !important;
|
| 214 |
-
font-weight: bold !important;
|
| 215 |
}
|
| 216 |
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
margin-right: 8px !important; /* فاصله از دکمه رادیویی */
|
| 227 |
-
}
|
| 228 |
-
|
| 229 |
-
/* دایره رادیویی */
|
| 230 |
-
.stRadio input[type="radio"] + span {
|
| 231 |
-
border-color: #000000 !important; /* حاشیه مشکی */
|
| 232 |
-
}
|
| 233 |
-
|
| 234 |
-
/* دایره رادیویی هنگام انتخاب */
|
| 235 |
-
.stRadio input[type="radio"]:checked + span {
|
| 236 |
-
background-color: #000000 !important; /* پسزمینه مشکی */
|
| 237 |
-
border-color: #000000 !important;
|
| 238 |
-
}
|
| 239 |
-
|
| 240 |
-
/* متن گزینهها */
|
| 241 |
-
.stRadio span {
|
| 242 |
-
color: #000000 !important; /* مشکی خالص */
|
| 243 |
-
font-size: 14px !important;
|
| 244 |
-
padding-right: 5px !important;
|
| 245 |
-
}
|
| 246 |
-
|
| 247 |
-
/* حالت hover */
|
| 248 |
-
.stRadio label:hover span {
|
| 249 |
-
color: #333333 !important; /* مشکی کمی روشنتر */
|
| 250 |
-
}
|
| 251 |
-
|
| 252 |
-
/* کانتینر اصلی */
|
| 253 |
-
.stRadio > div {
|
| 254 |
-
margin-bottom: 10px !important;
|
| 255 |
}
|
| 256 |
|
| 257 |
-
|
| 258 |
-
/* تنظیمات مخصوص موبایل */
|
| 259 |
@media (max-width: 768px) {
|
| 260 |
-
.
|
| 261 |
-
|
| 262 |
-
}
|
| 263 |
-
|
| 264 |
-
/* فرمها در موبایل */
|
| 265 |
-
.stTextInput>label,
|
| 266 |
-
.stNumberInput>label,
|
| 267 |
-
.stSelectbox>label {
|
| 268 |
-
font-size: 14px !important;
|
| 269 |
-
padding: 4px 0 !important;
|
| 270 |
}
|
| 271 |
|
| 272 |
.stTextInput input,
|
| 273 |
.stNumberInput input,
|
| 274 |
.stSelectbox select {
|
| 275 |
-
|
| 276 |
-
padding: 12px !important;
|
| 277 |
-
height: auto !important;
|
| 278 |
-
}
|
| 279 |
-
|
| 280 |
-
.stButton>button {
|
| 281 |
-
font-size: 14px !important;
|
| 282 |
-
padding: 8px 16px !important;
|
| 283 |
-
}
|
| 284 |
-
|
| 285 |
-
.stMarkdown h3 {
|
| 286 |
-
font-size: 16px !important;
|
| 287 |
-
}
|
| 288 |
-
|
| 289 |
-
.stMarkdown p {
|
| 290 |
-
font-size: 13px !important;
|
| 291 |
-
}
|
| 292 |
-
|
| 293 |
-
.stSelectbox [role="listbox"] {
|
| 294 |
font-size: 16px !important;
|
| 295 |
}
|
| 296 |
}
|
|
|
|
| 31 |
--border: #dddddd;
|
| 32 |
--input-bg: #ffffff;
|
| 33 |
--secondary-bg: #f8f9fa;
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
|
| 36 |
* {
|
|
|
|
| 39 |
direction: rtl !important;
|
| 40 |
}
|
| 41 |
|
|
|
|
| 42 |
body, .stApp, [data-testid="stAppViewContainer"] {
|
| 43 |
background-color: var(--background) !important;
|
| 44 |
color: var(--text) !important;
|
| 45 |
}
|
| 46 |
|
| 47 |
+
/* استایل فرمها و کارتها */
|
| 48 |
+
.stForm, .stCard {
|
| 49 |
+
border: 1px solid var(--primary) !important;
|
| 50 |
+
border-radius: 10px !important;
|
| 51 |
+
padding: 20px !important;
|
| 52 |
+
margin-bottom: 20px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
background-color: var(--secondary-bg) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
|
| 56 |
+
/* استایل ورودیها */
|
|
|
|
| 57 |
.stTextInput input,
|
| 58 |
.stNumberInput input,
|
| 59 |
.stSelectbox select,
|
| 60 |
+
.stTextArea textarea {
|
| 61 |
+
border: 1px solid var(--primary) !important;
|
| 62 |
+
border-radius: 5px !important;
|
| 63 |
+
padding: 8px 12px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
background-color: var(--input-bg) !important;
|
| 65 |
+
}
|
| 66 |
+
|
|
|
|
| 67 |
/* استایل لیبلها */
|
| 68 |
.stTextInput > label,
|
| 69 |
.stNumberInput > label,
|
| 70 |
.stSelectbox > label,
|
| 71 |
+
.stRadio > label {
|
|
|
|
| 72 |
color: var(--text) !important;
|
| 73 |
font-weight: bold !important;
|
| 74 |
+
margin-bottom: 8px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
+
/* استایل رادیو باتنها */
|
| 78 |
+
.stRadio input[type="radio"] + span {
|
| 79 |
+
border-color: var(--primary) !important;
|
|
|
|
|
|
|
| 80 |
background-color: white !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
}
|
|
|
|
| 82 |
|
| 83 |
+
.stRadio input[type="radio"]:checked + span {
|
|
|
|
| 84 |
background-color: var(--primary) !important;
|
| 85 |
+
border-color: var(--primary) !important;
|
| 86 |
+
box-shadow: inset 0 0 0 2px white !important;
|
|
|
|
|
|
|
|
|
|
| 87 |
}
|
| 88 |
|
| 89 |
+
.stRadio input[type="radio"]:checked + span + span {
|
| 90 |
+
color: var(--primary) !important;
|
| 91 |
+
font-weight: bold !important;
|
|
|
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
+
/* استایل دکمهها */
|
| 95 |
+
.stButton > button,
|
| 96 |
+
[data-testid="baseButton-primary"] {
|
|
|
|
|
|
|
| 97 |
background-color: var(--primary) !important;
|
| 98 |
color: white !important;
|
| 99 |
border: none !important;
|
|
|
|
| 102 |
font-weight: bold !important;
|
| 103 |
}
|
| 104 |
|
| 105 |
+
/* استایل selectbox */
|
| 106 |
+
div[data-baseweb="select"] {
|
| 107 |
+
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
|
| 110 |
+
div[data-baseweb="select"]::after {
|
| 111 |
+
content: "▼";
|
| 112 |
+
position: absolute;
|
| 113 |
+
left: 8px;
|
| 114 |
+
top: 50%;
|
| 115 |
+
transform: translateY(-50%);
|
| 116 |
+
color: var(--primary);
|
| 117 |
+
font-size: 14px;
|
| 118 |
+
pointer-events: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
}
|
| 120 |
|
| 121 |
+
/* استایلهای مخصوص موبایل */
|
|
|
|
| 122 |
@media (max-width: 768px) {
|
| 123 |
+
.stForm, .stCard {
|
| 124 |
+
padding: 15px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
.stTextInput input,
|
| 128 |
.stNumberInput input,
|
| 129 |
.stSelectbox select {
|
| 130 |
+
padding: 10px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
font-size: 16px !important;
|
| 132 |
}
|
| 133 |
}
|