Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,29 +80,6 @@ html, body, .stApp {
|
|
| 80 |
overflow: hidden !important;
|
| 81 |
background-color: var(--background) !important;
|
| 82 |
}
|
| 83 |
-
@media (min-width: 768px) {
|
| 84 |
-
[data-testid="stAppViewContainer"] {
|
| 85 |
-
padding: 5px !important;
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
[data-testid="stAppViewContainer"] > div,
|
| 89 |
-
[data-testid="stAppViewContainer"] > div > div,
|
| 90 |
-
[data-testid="stAppViewContainer"] > div > div > div {
|
| 91 |
-
padding: 0 !important;
|
| 92 |
-
margin: 0 !important;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/* تنظیمات عناصر خاص */
|
| 96 |
-
.stMarkdown, .stBlock, .stAlert {
|
| 97 |
-
padding: 2px !important;
|
| 98 |
-
margin: 2px 0 !important;
|
| 99 |
-
}
|
| 100 |
-
|
| 101 |
-
.rahyar-title {
|
| 102 |
-
margin-top: 0 !important;
|
| 103 |
-
padding-top: 0 !important;
|
| 104 |
-
}
|
| 105 |
-
}
|
| 106 |
|
| 107 |
/* دکمه هوم مجازی */
|
| 108 |
[data-testid="stAppViewContainer"]::after {
|
|
@@ -556,6 +533,20 @@ h3 {
|
|
| 556 |
</style>
|
| 557 |
""", unsafe_allow_html=True)
|
| 558 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 559 |
|
| 560 |
|
| 561 |
# ========== توابع اصلی ==========
|
|
|
|
| 80 |
overflow: hidden !important;
|
| 81 |
background-color: var(--background) !important;
|
| 82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
/* دکمه هوم مجازی */
|
| 85 |
[data-testid="stAppViewContainer"]::after {
|
|
|
|
| 533 |
</style>
|
| 534 |
""", unsafe_allow_html=True)
|
| 535 |
|
| 536 |
+
st.components.v1.html("""
|
| 537 |
+
<script>
|
| 538 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 539 |
+
const container = document.querySelector('[data-testid="stAppViewContainer"]');
|
| 540 |
+
if (container && window.innerWidth >= 768) {
|
| 541 |
+
container.style.padding = '5px';
|
| 542 |
+
container.querySelectorAll('*').forEach(el => {
|
| 543 |
+
el.style.margin = '0';
|
| 544 |
+
el.style.padding = '0';
|
| 545 |
+
});
|
| 546 |
+
}
|
| 547 |
+
});
|
| 548 |
+
</script>
|
| 549 |
+
""")
|
| 550 |
|
| 551 |
|
| 552 |
# ========== توابع اصلی ==========
|