Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -543,6 +543,43 @@ h3 {
|
|
| 543 |
</style>
|
| 544 |
""", unsafe_allow_html=True)
|
| 545 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 546 |
|
| 547 |
# ========== توابع اصلی ==========
|
| 548 |
def create_ride_map():
|
|
|
|
| 543 |
</style>
|
| 544 |
""", unsafe_allow_html=True)
|
| 545 |
|
| 546 |
+
st.components.v1.html("""
|
| 547 |
+
<script>
|
| 548 |
+
setTimeout(() => {
|
| 549 |
+
const forceRemoveSidePadding = () => {
|
| 550 |
+
const containers = [
|
| 551 |
+
...document.querySelectorAll('[data-testid="stAppViewContainer"], [data-testid="stAppViewContainer"] > div, [data-testid="stVerticalBlock"]'),
|
| 552 |
+
...document.querySelectorAll('.stMarkdown, .stTextInput, .stNumberInput, .stSelectbox, .stButton')
|
| 553 |
+
];
|
| 554 |
+
|
| 555 |
+
containers.forEach(el => {
|
| 556 |
+
el.style.paddingLeft = '0';
|
| 557 |
+
el.style.paddingRight = '0';
|
| 558 |
+
el.style.marginLeft = '0';
|
| 559 |
+
el.style.marginRight = '0';
|
| 560 |
+
});
|
| 561 |
+
|
| 562 |
+
// تنظیمات ویژه برای نقشه
|
| 563 |
+
const maps = document.querySelectorAll('.folium-map');
|
| 564 |
+
maps.forEach(map => {
|
| 565 |
+
map.style.width = '100%';
|
| 566 |
+
map.style.marginLeft = '0';
|
| 567 |
+
map.style.marginRight = '0';
|
| 568 |
+
});
|
| 569 |
+
};
|
| 570 |
+
|
| 571 |
+
// اجرای اولیه
|
| 572 |
+
forceRemoveSidePadding();
|
| 573 |
+
|
| 574 |
+
// اجرای مجدد پس از تغییرات دینامیک
|
| 575 |
+
new MutationObserver(forceRemoveSidePadding).observe(document.body, {
|
| 576 |
+
childList: true,
|
| 577 |
+
subtree: true
|
| 578 |
+
});
|
| 579 |
+
}, 100);
|
| 580 |
+
</script>
|
| 581 |
+
""")
|
| 582 |
+
|
| 583 |
|
| 584 |
# ========== توابع اصلی ==========
|
| 585 |
def create_ride_map():
|