Maryam Ilka commited on
Commit
dc81604
·
verified ·
1 Parent(s): 6e4d25f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -28
app.py CHANGED
@@ -603,44 +603,19 @@ def attention_check1():
603
 
604
  # 2. ایجاد دکمه سبز با JavaScript
605
  st.components.v1.html(f"""
606
- <script>
607
- function handleClick() {{
608
- // فعال کردن دکمه مخفی Streamlit
609
- parent.document.querySelector('div[data-testid="stButton"] > button[kind="primary"]').click();
610
- }}
611
- </script>
612
-
613
  <button onclick="handleClick()"
614
  style="
615
- background-color: #28a745;
616
  color: white;
617
  border: none;
618
  border-radius: 8px;
619
  padding: 12px 24px;
620
- font-weight: bold;
621
  width: 100%;
622
  cursor: pointer;
623
- font-family: 'Vazir', sans-serif;
624
- text-align: center;
625
- transition: all 0.3s ease;
626
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
627
- margin: 15px 0;
628
- font-size: 16px;
629
- display: flex;
630
- align-items: center;
631
- justify-content: center;
632
- "
633
- onmouseover="this.style.backgroundColor='#218838'; this.style.boxShadow='0 4px 8px rgba(0,0,0,0.15)';"
634
- onmouseout="this.style.backgroundColor='#28a745'; this.style.boxShadow='0 2px 4px rgba(0,0,0,0.1)';"
635
- onmousedown="this.style.transform='translateY(1px)';"
636
- onmouseup="this.style.transform='translateY(0)';">
637
-
638
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-left: 8px;">
639
- <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
640
- </svg>
641
  ادامه
642
  </button>
643
- """, height=80)
644
 
645
 
646
  # 3. منطق اصلی دکمه (مخفی)
 
603
 
604
  # 2. ایجاد دکمه سبز با JavaScript
605
  st.components.v1.html(f"""
 
 
 
 
 
 
 
606
  <button onclick="handleClick()"
607
  style="
608
+ background: #28a745;
609
  color: white;
610
  border: none;
611
  border-radius: 8px;
612
  padding: 12px 24px;
 
613
  width: 100%;
614
  cursor: pointer;
615
+ ">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  ادامه
617
  </button>
618
+ """, height=60)
619
 
620
 
621
  # 3. منطق اصلی دکمه (مخفی)