Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -601,33 +601,36 @@ def attention_check1():
|
|
| 601 |
key="att1_radio"
|
| 602 |
)
|
| 603 |
|
| 604 |
-
|
| 605 |
st.components.v1.html(f"""
|
| 606 |
<script>
|
| 607 |
function handleClick() {{
|
| 608 |
-
//
|
| 609 |
-
parent.document.
|
| 610 |
}}
|
| 611 |
</script>
|
| 612 |
|
| 613 |
-
<button onclick="handleClick()" class="custom-green-btn">
|
| 614 |
-
ادامه
|
| 615 |
-
</button>
|
| 616 |
-
""", height=60)
|
| 617 |
-
st.components.v1.html(f"""
|
| 618 |
<button onclick="handleClick()"
|
| 619 |
style="
|
| 620 |
-
background: #28a745;
|
| 621 |
color: white;
|
| 622 |
border: none;
|
| 623 |
border-radius: 8px;
|
| 624 |
padding: 12px 24px;
|
| 625 |
width: 100%;
|
| 626 |
cursor: pointer;
|
| 627 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 628 |
ادامه
|
| 629 |
</button>
|
| 630 |
-
""", height=
|
| 631 |
|
| 632 |
|
| 633 |
# 3. منطق اصلی دکمه (مخفی)
|
|
|
|
| 601 |
key="att1_radio"
|
| 602 |
)
|
| 603 |
|
| 604 |
+
# کامپوننت HTML با دکمه سبز اصلی
|
| 605 |
st.components.v1.html(f"""
|
| 606 |
<script>
|
| 607 |
function handleClick() {{
|
| 608 |
+
// ارسال سیگنال به Streamlit
|
| 609 |
+
parent.document.dispatchEvent(new CustomEvent('green_btn_clicked'));
|
| 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 |
width: 100%;
|
| 621 |
cursor: pointer;
|
| 622 |
+
font-family: 'Vazir', sans-serif;
|
| 623 |
+
font-size: 16px;
|
| 624 |
+
font-weight: bold;
|
| 625 |
+
margin: 15px 0;
|
| 626 |
+
transition: all 0.3s;
|
| 627 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
| 628 |
+
"
|
| 629 |
+
onmouseover="this.style.backgroundColor='#218838'; this.style.boxShadow='0 4px 8px rgba(0,0,0,0.15)';"
|
| 630 |
+
onmouseout="this.style.backgroundColor='#28a745'; this.style.boxShadow='0 2px 5px rgba(0,0,0,0.1)';">
|
| 631 |
ادامه
|
| 632 |
</button>
|
| 633 |
+
""", height=70)
|
| 634 |
|
| 635 |
|
| 636 |
# 3. منطق اصلی دکمه (مخفی)
|