Maryam Ilka commited on
Commit
8cf4881
·
verified ·
1 Parent(s): fa1c171

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -128
app.py CHANGED
@@ -58,7 +58,7 @@ st.markdown("""
58
  font-size: 14px !important;
59
  }
60
 
61
- /* باکس‌های ورودی */
62
  .stTextInput input,
63
  .stNumberInput input,
64
  .stSelectbox select,
@@ -67,13 +67,22 @@ st.markdown("""
67
  .stTimeInput input,
68
  .stMultiSelect div[role="combobox"],
69
  div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > div > div > input,
70
- /* لیست dropdown */
71
  .st-bq, .st-br, .st-bs, .st-bt, .st-bu, .st-bv, .st-bw, .st-bx, .st-by, .st-bz {
72
- color: var(--text) !important;
73
  background-color: var(--input-bg) !important;
 
 
 
 
 
 
 
 
 
 
74
  }
75
 
76
- /* استایل برای متن بالای باکس‌های دموگرافیک */
77
  .stTextInput > label,
78
  .stNumberInput > label,
79
  .stSelectbox > label,
@@ -89,7 +98,7 @@ st.markdown("""
89
  opacity: 0.7 !important;
90
  }
91
 
92
- /* دکمه اصلی (بنفش با متن سفید) */
93
  .stButton>button,
94
  [data-testid="baseButton-primary"],
95
  .accept-btn,
@@ -102,19 +111,6 @@ st.markdown("""
102
  font-weight: bold !important;
103
  }
104
 
105
- /* دکمه ثانویه (سفید با حاشیه بنفش) */
106
- .stFormSubmitButton>button,
107
- [data-testid="baseButton-secondary"],
108
- .reject-btn {
109
- background-color: var(--primary) !important;
110
- color: var(--input-bg) !important;
111
- border: 1px solid var(--primary) !important;
112
- border-radius: 8px !important;
113
- padding: 10px 20px !important;
114
- font-weight: bold !important;
115
- }
116
-
117
-
118
  /* کامپوننت‌های سفارشی */
119
  .rahyar-header {
120
  background-color: var(--primary) !important;
@@ -133,85 +129,13 @@ st.markdown("""
133
  border-right: 5px solid var(--primary) !important;
134
  }
135
 
136
- .rahyar-price {
137
- color: var(--primary) !important;
138
- font-size: 28px !important;
139
- font-weight: bold !important;
140
- }
141
-
142
- /* فرم دموگرافیک */
143
- .stSelectbox > div > div {
144
- background-color: white !important;
145
- color: var(--text) !important;
146
- }
147
-
148
- .stSelectbox option {
149
- background-color: white !important;
150
- color: var(--text) !important;
151
- }
152
-
153
- /* توضیحات */
154
- .explanation-title {
155
- color: var(--primary) !important;
156
- font-weight: bold !important;
157
- margin: 20px 0 10px 0 !important;
158
- font-size: 18px !important;
159
- }
160
-
161
- .explanation-item {
162
- background-color: var(--secondary-bg) !important;
163
- border-radius: 8px !important;
164
- padding: 12px 15px !important;
165
- margin: 8px 0 !important;
166
- border-right: 3px solid var(--primary) !important;
167
- }
168
-
169
- /* استایل برای سوالات رادیویی و گزینه‌ها */
170
- .stRadio > label,
171
- .stRadio > div > label,
172
- .stRadio > div > div > label,
173
- .stRadio > div > div > div > label,
174
- .stRadio span {
175
- color: black !important;
176
- }
177
-
178
- /* استایل برای متن سوالات */
179
- .stMarkdown h3,
180
- .stMarkdown p {
181
- color: black !important;
182
- }
183
-
184
- /* استایل برای دکمه ثبت */
185
- .stButton > button {
186
- color: white !important;
187
- }
188
-
189
- /* پیام موفقیت */
190
- .stAlert .stSuccess {
191
- color: var(--text) !important;
192
- background-color: #f0fff0 !important;
193
- }
194
-
195
-
196
- /* تنظیمات مخصوص دسکتاپ */
197
- @media (min-width: 769px) {
198
- .folium-map {
199
- height: 500px !important;
200
- }
201
- }
202
-
203
  /* تنظیمات مخصوص موبایل */
204
  @media (max-width: 768px) {
205
  .folium-map {
206
  height: 300px !important;
207
  }
208
 
209
- .stSelectbox > div > div {
210
- padding: 8px !important;
211
- }
212
- /* استایل‌های مخصوص موبایل */
213
- @media (max-width: 768px) {
214
- /* تنظیمات عمومی فرم */
215
  .stTextInput>label,
216
  .stNumberInput>label,
217
  .stSelectbox>label {
@@ -219,65 +143,31 @@ st.markdown("""
219
  padding: 4px 0 !important;
220
  }
221
 
222
- /* باکس‌های ورودی */
223
  .stTextInput input,
224
  .stNumberInput input,
225
  .stSelectbox select {
226
- font-size: 14px !important;
227
- padding: 8px 12px !important;
 
228
  }
229
 
230
- /* دکمه‌ها */
231
  .stButton>button {
232
  font-size: 14px !important;
233
  padding: 8px 16px !important;
234
  }
235
 
236
- /* عنوان‌ها */
237
  .stMarkdown h3 {
238
  font-size: 16px !important;
239
  }
240
 
241
- /* متن‌های توضیحی */
242
  .stMarkdown p {
243
  font-size: 13px !important;
244
  }
245
- }
246
- /* تنظیمات عمومی برای همه inputها */
247
- .stTextInput input,
248
- .stNumberInput input,
249
- .stSelectbox select,
250
- .stTextArea textarea {
251
- color: #000000 !important; /* متن سیاه */
252
- background-color: #ffffff !important; /* پسزمینه سفید */
253
- border: 1px solid #6a0dad !important; /* حاشیه بنفش */
254
- }
255
-
256
- /* برای حالت hover و focus */
257
- .stTextInput input:focus,
258
- .stNumberInput input:focus,
259
- .stSelectbox select:focus,
260
- .stTextArea textarea:focus {
261
- border-color: #6a0dad !important;
262
- box-shadow: 0 0 0 2px rgba(106, 13, 173, 0.2) !important;
263
- }
264
-
265
- /* مخصوص موبایل - اندازه بزرگتر */
266
- @media (max-width: 768px) {
267
- .stTextInput input,
268
- .stNumberInput input,
269
- .stSelectbox select {
270
- font-size: 16px !important;
271
- padding: 12px !important;
272
- height: auto !important;
273
- }
274
 
275
- /* لیست dropdown */
276
  .stSelectbox [role="listbox"] {
277
  font-size: 16px !important;
278
  }
279
  }
280
- }
281
  </style>
282
  """, unsafe_allow_html=True)
283
 
 
58
  font-size: 14px !important;
59
  }
60
 
61
+ /* باکس‌های ورودی - عمومی */
62
  .stTextInput input,
63
  .stNumberInput input,
64
  .stSelectbox select,
 
67
  .stTimeInput input,
68
  .stMultiSelect div[role="combobox"],
69
  div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > div > div > input,
 
70
  .st-bq, .st-br, .st-bs, .st-bt, .st-bu, .st-bv, .st-bw, .st-bx, .st-by, .st-bz {
71
+ color: #000000 !important;
72
  background-color: var(--input-bg) !important;
73
+ border: 1px solid var(--primary) !important;
74
+ }
75
+
76
+ /* حالت فوکوس */
77
+ .stTextInput input:focus,
78
+ .stNumberInput input:focus,
79
+ .stSelectbox select:focus,
80
+ .stTextArea textarea:focus {
81
+ border-color: var(--primary) !important;
82
+ box-shadow: 0 0 0 2px rgba(106, 13, 173, 0.2) !important;
83
  }
84
 
85
+ /* لیبل‌ها */
86
  .stTextInput > label,
87
  .stNumberInput > label,
88
  .stSelectbox > label,
 
98
  opacity: 0.7 !important;
99
  }
100
 
101
+ /* دکمه‌ها */
102
  .stButton>button,
103
  [data-testid="baseButton-primary"],
104
  .accept-btn,
 
111
  font-weight: bold !important;
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  /* کامپوننت‌های سفارشی */
115
  .rahyar-header {
116
  background-color: var(--primary) !important;
 
129
  border-right: 5px solid var(--primary) !important;
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /* تنظیمات مخصوص موبایل */
133
  @media (max-width: 768px) {
134
  .folium-map {
135
  height: 300px !important;
136
  }
137
 
138
+ /* فرم‌ها در موبایل */
 
 
 
 
 
139
  .stTextInput>label,
140
  .stNumberInput>label,
141
  .stSelectbox>label {
 
143
  padding: 4px 0 !important;
144
  }
145
 
 
146
  .stTextInput input,
147
  .stNumberInput input,
148
  .stSelectbox select {
149
+ font-size: 16px !important;
150
+ padding: 12px !important;
151
+ height: auto !important;
152
  }
153
 
 
154
  .stButton>button {
155
  font-size: 14px !important;
156
  padding: 8px 16px !important;
157
  }
158
 
 
159
  .stMarkdown h3 {
160
  font-size: 16px !important;
161
  }
162
 
 
163
  .stMarkdown p {
164
  font-size: 13px !important;
165
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
 
 
167
  .stSelectbox [role="listbox"] {
168
  font-size: 16px !important;
169
  }
170
  }
 
171
  </style>
172
  """, unsafe_allow_html=True)
173