Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,28 +58,29 @@ html, body, .stApp {
|
|
| 58 |
}
|
| 59 |
|
| 60 |
@media (min-width: 768px) {
|
| 61 |
-
/* Reset
|
| 62 |
html, body {
|
| 63 |
-
margin:
|
| 64 |
padding: 0 !important;
|
| 65 |
-
background: #f0f0f0 !important;
|
| 66 |
height: 100vh !important;
|
|
|
|
| 67 |
overflow: hidden !important;
|
| 68 |
}
|
| 69 |
-
|
| 70 |
-
/*
|
| 71 |
body {
|
| 72 |
display: flex !important;
|
| 73 |
justify-content: center !important;
|
| 74 |
align-items: center !important;
|
| 75 |
-
|
| 76 |
}
|
| 77 |
-
|
| 78 |
-
/* Mobile frame styling */
|
| 79 |
[data-testid="stAppViewContainer"] {
|
| 80 |
width: 475px !important;
|
| 81 |
height: 667px !important;
|
| 82 |
-
margin: 0
|
| 83 |
border: 12px solid #000 !important;
|
| 84 |
border-radius: 40px !important;
|
| 85 |
box-shadow:
|
|
@@ -95,21 +96,12 @@ html, body, .stApp {
|
|
| 95 |
position: relative !important;
|
| 96 |
}
|
| 97 |
|
| 98 |
-
/*
|
| 99 |
-
#root, .stApp {
|
| 100 |
-
background: transparent !important;
|
| 101 |
-
padding: 0 !important;
|
| 102 |
-
margin: 0 !important;
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
/* Ensure Streamlit's main container doesn't add extra space */
|
| 106 |
[data-testid="stAppViewContainer"] > div {
|
| 107 |
-
|
| 108 |
-
padding: 0 !important;
|
| 109 |
-
margin: 0 !important;
|
| 110 |
}
|
| 111 |
|
| 112 |
-
/*
|
| 113 |
[data-testid="stAppViewContainer"]::-webkit-scrollbar {
|
| 114 |
width: 6px !important;
|
| 115 |
right: 0 !important;
|
|
@@ -127,14 +119,8 @@ html, body, .stApp {
|
|
| 127 |
border-radius: 3px !important;
|
| 128 |
margin-left: 10px !important;
|
| 129 |
}
|
| 130 |
-
|
| 131 |
-
/*
|
| 132 |
-
[data-testid="stAppViewContainer"] > * {
|
| 133 |
-
direction: ltr !important;
|
| 134 |
-
text-align: right !important;
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
/* Virtual home button */
|
| 138 |
[data-testid="stAppViewContainer"]::after {
|
| 139 |
content: "";
|
| 140 |
position: absolute;
|
|
@@ -146,6 +132,15 @@ html, body, .stApp {
|
|
| 146 |
background: #333;
|
| 147 |
border-radius: 2px;
|
| 148 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
}
|
| 150 |
|
| 151 |
/* هدر راهیار */
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
@media (min-width: 768px) {
|
| 61 |
+
/* Reset and base styles */
|
| 62 |
html, body {
|
| 63 |
+
margin: 0 !important;
|
| 64 |
padding: 0 !important;
|
| 65 |
+
background: #f0f0f0 !important;
|
| 66 |
height: 100vh !important;
|
| 67 |
+
width: 100vw !important;
|
| 68 |
overflow: hidden !important;
|
| 69 |
}
|
| 70 |
+
|
| 71 |
+
/* Main container to center the mobile frame */
|
| 72 |
body {
|
| 73 |
display: flex !important;
|
| 74 |
justify-content: center !important;
|
| 75 |
align-items: center !important;
|
| 76 |
+
padding: 20px !important; /* فضای اطراف کادر موبایل */
|
| 77 |
}
|
| 78 |
+
|
| 79 |
+
/* Mobile frame styling - now perfectly centered */
|
| 80 |
[data-testid="stAppViewContainer"] {
|
| 81 |
width: 475px !important;
|
| 82 |
height: 667px !important;
|
| 83 |
+
margin: 0 !important; /* حذف margin اتوماتیک */
|
| 84 |
border: 12px solid #000 !important;
|
| 85 |
border-radius: 40px !important;
|
| 86 |
box-shadow:
|
|
|
|
| 96 |
position: relative !important;
|
| 97 |
}
|
| 98 |
|
| 99 |
+
/* پدینگ برای محتوای داخل کادر موبایل */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
[data-testid="stAppViewContainer"] > div {
|
| 101 |
+
padding: 0 5px !important; /* 5px padding راست و چپ */
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
|
| 104 |
+
/* تنظیمات اسکرولبار */
|
| 105 |
[data-testid="stAppViewContainer"]::-webkit-scrollbar {
|
| 106 |
width: 6px !important;
|
| 107 |
right: 0 !important;
|
|
|
|
| 119 |
border-radius: 3px !important;
|
| 120 |
margin-left: 10px !important;
|
| 121 |
}
|
| 122 |
+
|
| 123 |
+
/* دکمه هوم مجازی */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
[data-testid="stAppViewContainer"]::after {
|
| 125 |
content: "";
|
| 126 |
position: absolute;
|
|
|
|
| 132 |
background: #333;
|
| 133 |
border-radius: 2px;
|
| 134 |
}
|
| 135 |
+
|
| 136 |
+
/* اطمینان از نمایش صحیح محتوا */
|
| 137 |
+
[data-testid="block-container"] {
|
| 138 |
+
padding: 0 5px !important;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.stApp > div {
|
| 142 |
+
padding: 0 5px !important;
|
| 143 |
+
}
|
| 144 |
}
|
| 145 |
|
| 146 |
/* هدر راهیار */
|