Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,6 +31,8 @@ st.markdown("""
|
|
| 31 |
--border: #dddddd;
|
| 32 |
--input-bg: #ffffff;
|
| 33 |
--secondary-bg: #f8f9fa;
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
|
| 36 |
* {
|
|
@@ -39,61 +41,159 @@ st.markdown("""
|
|
| 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 |
-
.
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
background-color: var(--secondary-bg) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
|
| 56 |
-
/* استایل ورودی
|
|
|
|
| 57 |
.stTextInput input,
|
| 58 |
.stNumberInput input,
|
| 59 |
.stSelectbox select,
|
| 60 |
-
.stTextArea textarea
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
border-radius: 5px !important;
|
| 63 |
padding: 8px 12px !important;
|
| 64 |
-
|
| 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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
background-color: white !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
}
|
|
|
|
| 82 |
|
| 83 |
-
|
|
|
|
| 84 |
background-color: var(--primary) !important;
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
| 87 |
}
|
| 88 |
|
| 89 |
-
.
|
| 90 |
-
color: var(--
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
-
/*
|
| 95 |
-
.stButton
|
| 96 |
-
[data-testid="baseButton-primary"]
|
|
|
|
|
|
|
| 97 |
background-color: var(--primary) !important;
|
| 98 |
color: white !important;
|
| 99 |
border: none !important;
|
|
@@ -102,32 +202,95 @@ st.markdown("""
|
|
| 102 |
font-weight: bold !important;
|
| 103 |
}
|
| 104 |
|
| 105 |
-
/* اس
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
}
|
| 120 |
|
| 121 |
-
|
|
|
|
| 122 |
@media (max-width: 768px) {
|
| 123 |
-
.
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
.stTextInput input,
|
| 128 |
.stNumberInput input,
|
| 129 |
.stSelectbox select {
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
font-size: 16px !important;
|
| 132 |
}
|
| 133 |
}
|
|
|
|
| 31 |
--border: #dddddd;
|
| 32 |
--input-bg: #ffffff;
|
| 33 |
--secondary-bg: #f8f9fa;
|
| 34 |
+
--green: #f0ff0;
|
| 35 |
+
--dgreen: #006400
|
| 36 |
}
|
| 37 |
|
| 38 |
* {
|
|
|
|
| 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 |
+
.rahyar-title {
|
| 52 |
+
color: var(--primary) !important;
|
| 53 |
+
margin: 0 !important;
|
| 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 |
+
.stDateInput input,
|
| 85 |
+
.stTimeInput input,
|
| 86 |
+
.stMultiSelect div[role="combobox"],
|
| 87 |
+
div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > div > div > input,
|
| 88 |
+
div[data-baseweb="select"] > div:first-child {
|
| 89 |
+
color: var(--text) !important;
|
| 90 |
+
background-color: var(--input-bg) !important;
|
| 91 |
+
border: 1px solid var(--primary) !important; /* استفاده از رنگ primary برای حاشیه */
|
| 92 |
border-radius: 5px !important;
|
| 93 |
padding: 8px 12px !important;
|
| 94 |
+
min-height: 40px !important;
|
| 95 |
}
|
| 96 |
+
|
| 97 |
+
/* استایل برای حالت hover و focus */
|
| 98 |
+
.stTextInput input:hover,
|
| 99 |
+
.stNumberInput input:hover,
|
| 100 |
+
.stSelectbox select:hover,
|
| 101 |
+
.stTextArea textarea:hover,
|
| 102 |
+
.stDateInput input:hover,
|
| 103 |
+
.stTimeInput input:hover {
|
| 104 |
+
border-color: var(--primary) !important;
|
| 105 |
+
box-shadow: 0 0 0 2px rgba(106, 13, 173, 0.2) !important;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
/* استایل لیبلها */
|
| 109 |
.stTextInput > label,
|
| 110 |
.stNumberInput > label,
|
| 111 |
.stSelectbox > label,
|
| 112 |
+
.stRadio > label,
|
| 113 |
+
.stSlider > label {
|
| 114 |
color: var(--text) !important;
|
| 115 |
font-weight: bold !important;
|
| 116 |
+
margin-bottom: 4px !important;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
/* استایل placeholder */
|
| 120 |
+
::placeholder {
|
| 121 |
+
color: var(--text) !important;
|
| 122 |
+
opacity: 0.7 !important;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
/* ========== استایلهای خاص Selectbox ========== */
|
| 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 |
+
/* ===== راه حل تضمینی برای استایل dropdown ===== */
|
| 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: white !important;
|
| 178 |
+
padding: 15px !important;
|
| 179 |
+
border-radius: 10px !important;
|
| 180 |
+
margin-bottom: 20px !important;
|
| 181 |
+
text-align: center !important;
|
| 182 |
}
|
| 183 |
|
| 184 |
+
.price-container {
|
| 185 |
+
background-color: var(--secondary-bg) !important;
|
| 186 |
+
border-radius: 10px !important;
|
| 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 |
font-weight: bold !important;
|
| 203 |
}
|
| 204 |
|
| 205 |
+
/* دکمه ثانویه (سفید با حاشیه بنفش) */
|
| 206 |
+
.stFormSubmitButton>button,
|
| 207 |
+
[data-testid="baseButton-secondary"],
|
| 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 |
+
.stRadio > label,
|
| 221 |
+
.stRadio > div > label,
|
| 222 |
+
.stRadio > div > div > label,
|
| 223 |
+
.stRadio > div > div > div > label {
|
| 224 |
+
color: #000000 !important; /* مشکی خالص */
|
| 225 |
+
font-weight: normal !important;
|
| 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 |
+
.folium-map {
|
| 261 |
+
height: 300px !important;
|
| 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 |
+
font-size: 16px !important;
|
| 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 |
}
|