Maryam Ilka commited on
Commit
496742e
·
verified ·
1 Parent(s): 97eaf53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -18
app.py CHANGED
@@ -476,10 +476,10 @@ def demographic_form():
476
  """فرم اطلاعات دموگرافیک"""
477
  st.markdown("""
478
  <style>
479
- /* استایل کلی تمام inputها و selectها */
480
- div[data-baseweb="input"] input,
481
- div[data-baseweb="select"] select,
482
- div[data-baseweb="textarea"] textarea {
483
  color: #333333 !important;
484
  background-color: white !important;
485
  border: 1px solid #6a0dad !important;
@@ -489,22 +489,23 @@ def demographic_form():
489
  }
490
 
491
  /* استایل placeholder */
492
- div[data-baseweb="input"] input::placeholder {
 
493
  color: #333333 !important;
494
  opacity: 1 !important;
495
  }
496
 
497
  /* استایل dropdown options */
498
- div[data-baseweb="select"] option {
499
  color: #333333 !important;
500
  background-color: white !important;
501
  }
502
 
503
- /* استایل دکمه submit */
504
- div[data-testid="stFormSubmitButton"] button {
505
- background-color: #6a0dad !important;
506
- color: white !important;
507
- border: none !important;
508
  border-radius: 8px !important;
509
  padding: 10px 24px !important;
510
  font-family: 'Vazir' !important;
@@ -513,15 +514,15 @@ def demographic_form():
513
  width: 100% !important;
514
  }
515
 
516
- div[data-testid="stFormSubmitButton"] button:hover {
517
- background-color: #7b1fa2 !important;
518
- transform: translateY(-2px);
519
- box-shadow: 0 4px 8px rgba(0,0,0,0.1);
520
  }
521
 
522
  /* استایل hover برای inputها */
523
- div[data-baseweb="input"] input:focus,
524
- div[data-baseweb="select"] select:focus {
 
525
  border-color: #8e44ad !important;
526
  box-shadow: 0 0 0 2px rgba(106, 13, 173, 0.2) !important;
527
  outline: none !important;
@@ -547,6 +548,7 @@ def demographic_form():
547
 
548
  ride_frequency = st.selectbox("دفعات استفاده از سرویس‌های اشتراک سفر در ماه",
549
  ["کمتر از 5 بار", "5-10 بار", "بیش از 10 بار"])
 
550
  submit_button = st.form_submit_button("ادامه")
551
 
552
  if submit_button:
@@ -557,7 +559,7 @@ def demographic_form():
557
  "ride_frequency": ride_frequency
558
  }
559
  st.session_state.current_page = "scenario_explanation"
560
- st.rerun()
561
 
562
  def scenario_explanation():
563
  """توضیح سناریو"""
 
476
  """فرم اطلاعات دموگرافیک"""
477
  st.markdown("""
478
  <style>
479
+ /* استایل کلی تمام inputها */
480
+ .stTextInput input,
481
+ .stNumberInput input,
482
+ .stSelectbox select {
483
  color: #333333 !important;
484
  background-color: white !important;
485
  border: 1px solid #6a0dad !important;
 
489
  }
490
 
491
  /* استایل placeholder */
492
+ .stTextInput input::placeholder,
493
+ .stNumberInput input::placeholder {
494
  color: #333333 !important;
495
  opacity: 1 !important;
496
  }
497
 
498
  /* استایل dropdown options */
499
+ .stSelectbox select option {
500
  color: #333333 !important;
501
  background-color: white !important;
502
  }
503
 
504
+ /* استایل دکمه submit ساده */
505
+ .stFormSubmitButton button {
506
+ background-color: white !important;
507
+ color: #6a0dad !important;
508
+ border: 1px solid #6a0dad !important;
509
  border-radius: 8px !important;
510
  padding: 10px 24px !important;
511
  font-family: 'Vazir' !important;
 
514
  width: 100% !important;
515
  }
516
 
517
+ .stFormSubmitButton button:hover {
518
+ background-color: #f0e6ff !important;
519
+ color: #6a0dad !important;
 
520
  }
521
 
522
  /* استایل hover برای inputها */
523
+ .stTextInput input:focus,
524
+ .stNumberInput input:focus,
525
+ .stSelectbox select:focus {
526
  border-color: #8e44ad !important;
527
  box-shadow: 0 0 0 2px rgba(106, 13, 173, 0.2) !important;
528
  outline: none !important;
 
548
 
549
  ride_frequency = st.selectbox("دفعات استفاده از سرویس‌های اشتراک سفر در ماه",
550
  ["کمتر از 5 بار", "5-10 بار", "بیش از 10 بار"])
551
+
552
  submit_button = st.form_submit_button("ادامه")
553
 
554
  if submit_button:
 
559
  "ride_frequency": ride_frequency
560
  }
561
  st.session_state.current_page = "scenario_explanation"
562
+ st.rerun()
563
 
564
  def scenario_explanation():
565
  """توضیح سناریو"""